Created
May 2, 2020 05:17
-
-
Save jahentao/6b8dc6dc342c7859f4ea64bb46f167e6 to your computer and use it in GitHub Desktop.
导出visio中图片为svg格式(VB脚本)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub ExportPages() | |
'Declare object variables as Visio object types. | |
Dim vsoPage As Visio.Page | |
Dim vsoDocument As Visio.Document | |
Dim vsoDocuments As Visio.Documents | |
Dim vsoPages As Visio.Pages | |
'Iterate through all open documents. | |
Set vsoDocuments = Application.Documents | |
For Each vsoDocument In vsoDocuments | |
'Print the drawing name in the Visual Basic Editor | |
'Immediate window. | |
Debug.Print vsoDocument.FullName | |
'Iterate through all pages in a drawing. | |
Set vsoPages = vsoDocument.Pages | |
For Each vsoPage In vsoPages | |
'Print the page name in the Visual Basic Editor | |
'Immediate window. | |
Debug.Print Tab(5); vsoPage.Name | |
vsoPage.Export ("D:\jahentao\Documents\ApplicationDevelopment\converted\" + vsoPage.Name + ".svg") | |
Next | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在visio文档中打开宏,运行效果