Last active
August 29, 2015 14:13
-
-
Save wikibook/d0b7a43f9ca1343ed264 to your computer and use it in GitHub Desktop.
파일 내 모든 비지오 다이어그램을 TIFF 파일로 저장
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 SaveAsTIFF() | |
Dim folder As String, filename As String | |
Dim doc As Visio.Document | |
Dim pg As Visio.Page | |
Dim i As Integer | |
Dim formatExtension As String | |
'// Init folder, doc and counter: | |
folder = ThisDocument.Path | |
formatExtension = ".tif" | |
Set doc = Visio.ActiveDocument | |
i = 1 | |
'// Loop through pages: | |
For Each pg In doc.Pages | |
'// Setup the filename: | |
filename = Format(i, "000") | |
'// Append '(bkgnd)' to background pages: | |
If (pg.Background) Then _ | |
filename = filename & " (bkgnd)" | |
'// Add the extension: | |
filename = filename & formatExtension | |
'// Save it: | |
Call pg.Export(folder & filename) | |
i = i + 1 | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment