Created
February 17, 2017 09:43
-
-
Save xsnpdngv/6c67b7c0a1cebe5c2938e2dc41eec175 to your computer and use it in GitHub Desktop.
Visio macro to export each page to svg
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
Sub exportSvg() | |
Dim formatExtension As String | |
formatExtension = ".svg" | |
' initializations | |
folder = ThisDocument.Path | |
Set doc = Visio.ActiveDocument | |
folder = doc.Path | |
' for each page | |
For Each pg In doc.Pages | |
' set filename | |
FileName = Left(doc.Name, Len(doc.Name) - 4) & "_" & pg.Name | |
' skip background pages | |
If (Not (pg.Background)) Then | |
' add extension | |
FileName = FileName & formatExtension | |
' save | |
Call pg.Export(folder & FileName) | |
End If | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment