2017-01-13 2 views
1

おはよう。 OPENEDGE/PROGRESS 4GLからMSWORDへの簡単な輸出に関してコミュニティに尋ねたいと思います。進歩の私の現在のバージョンは9.1Eです。OPENEDGEからMS WORDにCHARACTERをエクスポートするときの形式を編集

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.  

何私が学びたいことは関係なく、使用されているものをフォントスタイルのBOLDフォントフォーマットを持つように正当化するためにCH-PARとCCを設定することです。ここでは他のサイトからいくつかの編集後の私のサンプルコードです。

お返事ありがとうございます。 P.P. >は、このファイルをPDFに変換します。現在それを後で検索しています。

+0

おはよう。私が探していた答えの一つが見つかりました。文字をBOLD形式に設定します。私は構文 'chWordApplication:Selection:Font:Bold = TRUE.'と' chWordApplication:Selection:Font:Bold = false.'を使って変更しました。 JUSTIFYへのフォーマットは欠けている唯一のものです。 – noob

答えて

0

chWordApplication:Selection:ParagraphFormat:Alignment = 3

関連する問題