使用vbs实现DOC转PDF时候出现:Microsoft VBScript 运行时错误 错误 '800a01a8'
d--s 2015-10-05 11:02:54 求各位大虾指教:
错误信息:
Microsoft VBScript 运行时错误 错误 '800a01a8'
缺少对象: '[undefined]'
/test.asp,行 11
sub doc2pdf()
input = "D:\web\test.doc"
output = Left(input, InStrRev(input,".")) + "pdf"
set word = CreateObject("word.application")
set doc = word.Documents.OpenNoRepairDialog (input, 1) ‘ 出错位置
doc.ExportAsFixedFormat output, 17, 7, 1 '存为pdf文件
doc.Close(wdDoNotSaveChanges)
word.Quit
set doc = Nothing
set word = Nothing
end sub