Create a global macro in Word 2013:
' The Word macro for exporting to PDF (the Word window closes after finishin
g)
Sub ExportToPDFext()
ChangeFileOpenDirectory ThisDocument.Path
ActiveDocument.ExportAsFixedFormat _
OutputFileName:=Left(ActiveDocument.FullName, InStrRev(ActiveDocumen
t.FullName, ".")) + "pdf", _
ExportFormat:=wdExportFormatPDF, _
OpenAfterExport:=False, _
OptimizeFor:=wdExportOptimizeForPrint, _
Range:=wdExportAllDocument, _
From:=1, _
To:=1, _
Item:=wdExportDocumentContent, _
IncludeDocProps:=True, _
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, _
DocStructureTags:=True, _
BitmapMissingFonts:=True, _
UseISO19005_1:=False
Application.Quit SaveChanges:=wdDoNotSaveChanges
End Sub
After that you can convert a Word document to PDF in command line:
"C:\Program Files\Microsoft Office\Office15\WINWORD.EXE" /mExportToPDFext /q
"your_document_path.docx"
【 在 AaYaYa 的大作中提到: 】
: 【 以下文字转载自 OfficeSoft 讨论区 】
: 发信人: AaYaYa (啊呀呀*选帝侯初长成), 信区: OfficeSoft
: 标 题: 不装任何额外软件如何手撸一个批量转pdf的程序?
: ...................
--
FROM 103.121.208.*