VBScript,可在未启用兼容模式的情况下将DOC转换为DOCX

问题描述 投票:0回答:1

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

vbscript ms-word docx doc
1个回答
0
投票

现在可以使用。谢谢托玛拉克!

© www.soinside.com 2019 - 2024. All rights reserved.