Hi DCB,
Here's some VBA that you can paste into the VBA project of your drawing and
run.Or put it in another drawing (say, Tools.vsd) and just make sure that
the drawing you want to export is active.
Also, you should export one page first to make sure you get the export
settings (resolution, etc.) just the way you want. Visio only remembers the
export settings for the current Visio session. It forgets your choices when
it restarts.
Sub ExportPages()
Dim folder As String
Dim filename As String
Dim doc As Visio.Document
Dim pg As Visio.Page
Dim i As Integer
folder = ThisDocument.Path
Set doc = Visio.ActiveDocument
i = 1
For Each pg In doc.Pages
filename = Format(i, "000") & " " & pg.Name
If (pg.Background) Then filename = filename & " (bkgnd)"
filename = filename & ".gif"
Call pg.Export(folder & filename)
i = i + 1
Next
End Sub
--
Hope this helps,
Chris Roth
Visio MVP
More Visio shapes, articles, development info and pure diagramming fun at:
www.wanderkind.com/visio