下面的我的VBScript将Word DOC转换为DOCX:
Set oFSO = CreateObject("Scripting.FileSystemObject")
fullpath = oFSO.GetAbsolutePathName(Wscript.Arguments.Item(0))
justpath = Left(fullpath, InStrRev(fullpath, "\"))
basename = oFSO.GetBaseName(fullpath)
doxpath = justpath & basename & ".docx"
Set oWord = CreateObject("Word.Application")
Set doc = oWord.Documents.Open(fullpath)
doc.SaveAs2 doxpath, 16
doc.Close
oWord.Quit
Set oFSO = Nothing
但是,当我打开输出DOCX时,它在顶部显示“ [兼容模式]”。我可以设置一些属性或方法来在SaveAs2调用之前/之中/之后调用,以免发生这种情况吗?
现在可以使用。谢谢托玛拉克!