vba
假如所有word文档均在D:\ceshi文件夹下,利用word自带输出为pdf即可。还专门找了几个word文件测试了一下,以下代码没问题。
Sub 转pdf()
Dim t As Document
ss = Dir("D:\ceshi\")
Do
Set t = Documents.Open("D:\ceshi\" & ss)
t.ExportAsFixedFormat outputfilename:="D:\ceshi\" & Left(ss, Len(ss) - 4) & ".pdf", exportformat:=wdExportFormatPDF
t.Close False
ss = Dir
Loop Until ss = ""
MsgBox "均已把word文档转换为pdf"
End Sub