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
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