将字符从OPENEDGE导出到MS WORD时编辑格式



美好的一天。我想向社区询问从OPENEDGE/PROGRESS 4GL到MSWORD的简单导出。我目前的进度版本是 9.1E。这是我从其他网站进行一些编辑后的示例代码:

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.    

我希望学习的是将 ch-par 设置为 JUSTE,并将 cc 设置为具有粗体字体格式,无论使用什么字体样式。

谢谢你的回答。附言>将来会将此文件转换为PDF。目前正在稍后搜索。

chWordApplication:Selection:ParagraphFormat:Align = 3。

最新更新