Number of Pages - Max/Limit

L

lmerrim

I am hoping to find out what the max number of pages is that can be in a
single Visio file. Thanks in advance to anyone that can help.
 
C

Chris Roth [MVP]

Well, I got up to 1766 using this vba procedure, but it took a while, and
I'm not proud of it! It took about 15 minutes too!

Sub addpages()

Const FLUSH% = 50

Dim i As Integer, iFlush As Integer
Dim pg As Visio.Page

Visio.Application.UndoEnabled = False

For i = 1 To 600
Set pg = Visio.ActiveDocument.Pages.Add()
pg.Name = Visio.ActiveDocument.Pages.Count

iFlush = iFlush + 1
If iFlush = FLUSH Then
Debug.Print "Flushing at i = " & i
iFlush = 0
DoEvents
End If

Next i

Visio.Application.UndoEnabled = True

End Sub


Do you really need more?

My file was over 800k and had only empty pages, btw.

--
Hope this helps,

Chris Roth
Visio MVP

www.wanderkind.com/visio
 
M

Mark Nelson [MS]

I assume you mean 800MB and not KB. We're not that efficient!

It looks like Visio slows down after 500 pages or so. Don't try this with
Visio 2002 by the way. There were some significant non-linear issues with
pages in that release.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Chris Roth [MVP]

Nah, the pages were empty - 848 Kb. But the performance for adding
subsequent pages was dismal. Took about 5 seconds to add each page.

: )
 
M

Mark Nelson [MS]

I found an n-squared performance bottleneck in the New Page command that
becomes significant when you get into the hundreds of pages. A bug has been
logged.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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