Renaming a page changes the size of all other pages in document

N

Nick Martino

Hi,

I am writing a program that generates visio documentation in Visio 2002.

I need the pages to be size 17"x11".

When I change the name of my current page, all the previous page sizes are
changed back to 8.5"x11"

I would prefer to set a default page size for my document, but I'm not sure
if I can do this.

Does anyone know how to fix this problem?

Thanks,
Nick

The following is the snippet of code I am using:

Private appVisio As Visio.Application 'Instance of Visio
Private docsObj As Visio.Documents 'Documents collection of instance
Private docObj As Visio.Document 'Document to work in
Private pagesObj As Visio.Pages 'Pages collection of document
Private pageObj As Visio.Page 'Page to work in

' Create an instance of Visio
Set appVisio = CreateObject("visio.application")
Set docsObj = appVisio.Documents

Set docObj = docsObj.Add("")
Set pagesObj = appVisio.ActiveDocument.Pages

Do While Not EOF(1)

Routine = GetRoutine

Set pageObj = Nothing

If CurrentPage > 1 Then
Set pageObj = pagesObj.Add
Else
Set pageObj = pagesObj.Item(CurrentPage)
End If

' Name the page
pageObj.Name = Routine.RoutineName

' Make the page 11 x 17
pageObj.PageSheet.Cells("PageWidth") = 17
pageObj.PageSheet.Cells("PageHeight") = 11

CurrentPage = CurrentPage + 1

Loop
 
J

JuneTheSecond

The reason may be the drawing is not saved.
SaveAs or SaveAsEx method os available in Visio.
 
J

JuneTheSecond

The reason may be that the drwaing is not saved.
Save method and SaveAs, SaveAsEx methods are available.
 

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