Page Setup Across Multiple Pages

B

Ben

Is there any way to select multiple pages (tabs) in order to modify the Page
Setup properties for all those pages within a document? The MS help talks
about how being able to edit the page setup for each page independantly is a
'feature', however in our case we have a lot of pages and would like to
modify the page setup all at once.

Thanks!
B-
 
J

John Marshall, MVP

The only "easy" way to do it would be to write some VBA code to loop through
each page and change the appropriate property.

If you are familiar with VBA, you can use the Visio record command to see
what type of code you need or you can let me know what you are planning on
changing and I'l set up the code for you. (The code is not very difficult)

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 
B

Ben

Hey John,

That's a clever solution to get around Visio's inadequacies. Anyway thank
you for your offer to help me with the VBA code. Basically I'm trying to set
things up so that I can easily switch between two page setups; let's see if I
can explain it ...

Basically I have a custom Page Size of 16" x 14" throughout the document.
The first setup would be to print each of those Pages to two Portrait, Legal:
8.5" x 14" pages. The alternate setup would be to print each of the Pages to
one Landscape, Tabloid: 11" x 17" page (trimming off the bottom 3" of the
Page OR print the whole Page to Landscape, Letter: 8.5" x 11" and shrink the
content to fit). I think that's about it.

Please let me know if this makes sense or not. And once again thanks so
much for your generous help!

-B
 
J

John Marshall, MVP

Sorry for the delay, I got side tracked on other issues.

The following code should do what you want:

Public Sub PageSizeSet()
' Set the page size for all pages
Dim PagObj As Visio.Page

For Each PagObj In ActiveDocument.Pages
' Setup 1 - two portrait legal
PagObj.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties,
visPrintPropertiesScaleX).FormulaU = "1"
PagObj.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties,
visPrintPropertiesScaleY).FormulaU = "1"
PagObj.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties,
visPrintPropertiesPageOrientation).FormulaU = "1"
PagObj.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties,
visPrintPropertiesPaperKind).FormulaU = "5"

' Setup 2 - one landscape tabloid
PagObj.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties,
visPrintPropertiesPageOrientation).FormulaU = "2"
PagObj.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties,
visPrintPropertiesPaperKind).FormulaU = "3"

' Setup 3 - landscape letter shrink to fit
PagObj.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties,
visPrintPropertiesOnPage).FormulaU = "1"
PagObj.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties,
visPrintPropertiesPaperKind).FormulaU = "1"

Next
End Sub

You will have to make three copies and do some deletion so that each block
is in it's own Sub.

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 

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