下面的我的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调用之前/期间/之后调用,以免发生这种情况?