[stackoverflow] [progress Openedge Abl] Edit Format When Exporting Character From Openedge...

Status
Not open for further replies.
N

noob

Guest
Good day. I wish to ask the community regarding a simple export from OPENEDGE/PROGRESS 4GL to MSWORD. my current version of progress is 9.1E. here is my sample code after a few edits from other sites:

DEFINE VARIABLE chWordApplication AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE AppWordDocs AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE cMonthList AS CHARACTER NO-UNDO
INIT "January,February,March,April,May,June,July,August,September,October,November,December".

DEF VAR ch-par AS CHAR FORMAT 'x(500)'.
DEF VAR cc AS CHAR.

ASSIGN cc = 'cc:File'
ch-par = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.".

CREATE "Word.Application" chWordApplication.
chWordApplication:documents:Open("<file path>\<file>.doc",False,False,False,"","",False).

AppWordDocs=chWordApplication:ActiveDocument.

chWordApplication:VISIBLE=TRUE.

chWordApplication:selection:TypeParagraph.

chWordApplication:Selection:typetext(ch-par).

chWordApplication:selection:TypeParagraph.
chWordApplication:selection:TypeParagraph.

chWordApplication:Selection:typetext(cc).

/*chWordApplication:Quit().*/

RELEASE OBJECT chWordApplication.
RELEASE OBJECT AppWordDocs.


What i wish to learn is to set ch-par to JUSTIFY and cc to have a BOLD font format regardless of what font style is used.

Thanks for the answer. P.S. > in the future will convert this file to PDF. currently searching for that later.

Continue reading...
 
Status
Not open for further replies.
Top