wdo飞机编程

2023-11-09 08:09:34 数码极客 bianji01

 

delphi 如何将word转换为PDF

使用vba来指定保存的文件格式为pdf,当然前提必须已安装MS Office的PDF输出插件(默认应该有)procedure TForm1.btn1Click(Sender: TObject);wdo,wdoc,wdocs:OleVariant;wdo:=CreateOleObject(Word.Application);wdocs:=wdo.Documents;wdoc:=wdocs.Open(d:\test.docx);wdoc.ExportAsFixedFormat(OutputFileName:=d:\test.pdf, ExportFormat:=17);//查word的宏帮助{OpenAfterExport:=True, OptimizeFor:=wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, Item:=wdExportDocumentContent,IncludeDocProps:=True, KeepIRM:=True, CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, BitmapMissingFonts:=True, UseISO19005_1:=False);}用Delphi?wdo,wdoc,wdocs:OleVariant;beginwdo:=CreateOleObject(Word.Application);wdocs:=wdo.Documents;wdo.ActivePrinter:=AcrobatPDFWriter;wdoc:=wdocs.Open(c:\test.doc);wdoc.PrintOut(0,0,0,c:\test.pdf);你打算怎么转换呢?

声明:易趣百科所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系315127732@qq.com
广告位招租
横幅广告