Delphi convert doc to pdf using Word ActiveX
问题 Did anyone already wrote code for converting doc or docx to pdf using Word 2007 or Word 2010 pdf export capabilities? 回答1: I do it with the following .vbs script. If you need it in Delphi code then it would be easy enough to convert: Const wdDoNotSaveChanges = 0 Const wdRevisionsViewFinal = 0 Const wdFormatPDF = 17 Dim arguments Set arguments = WScript.Arguments Function DOC2PDF(sDocFile) Dim fso ' As FileSystemObject Dim wdo ' As Word.Application Dim wdoc ' As Word.Document Dim wdocs ' As