有没有什么优雅的方法可以将VSDX文件批量转换为VSD?请注意-这是实际的降级,而不是相反。它可以通过脚本来实现吗?或者我被第三方工具抛弃了..?万分感谢,亲切问候
发布于 2018-02-24 06:52:23
Visio文件中的VBA宏将执行此操作...
Sub Converter()
Dim StrFile As String
Dim objFSO, destRow As Long
Dim mainFolder, mySubFolder
Dim fullPathFileName
Set objFSO = CreateObject("Scripting.FileSystemObject")
mFolder = "C:\Users\sivancik001\Desktop\vsdx\" ' <<<< PATH TO BE CHANGED !!!!
Set mainFolder = objFSO.GetFolder(mFolder)
StrFile = Dir(mFolder & "*.vsdx*")
'Do While Len(StrFile) > 0
'... actions here ... but not needed as nothing should be in the root folder. files are in subfolders
'StrFile = Dir
'Loop
For Each mySubFolder In mainFolder.SubFolders
StrFile = Dir(mySubFolder & "\*.vsdx*")
Do While Len(StrFile) > 0
fullPathFileName = mySubFolder & "\" & StrFile
'MsgBox fullPathFileName
Application.Documents.Open fullPathFileName
Application.ActiveDocument.SaveAs Left(fullPathFileName, Len(fullPathFileName) - 1)
Application.ActiveDocument.Close
Kill fullPathFileName
StrFile = Dir
Loop
Next
End Subhttps://stackoverflow.com/questions/48954293
复制相似问题