How do I save 100 page Visio drawing in one large gif file?

D

dcb

When I select a gif file in "Save as type" box (under "Save As" menu option),
only the onscreen page is saved as a gif. I want to save entire drawing
(multiple pages). Can this be done?
 
C

Chris Roth [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top