Change page setup for _all_ pages in a document

  • Thread starter Mats-Lennart Hansson
  • Start date
M

Mats-Lennart Hansson

Hi,
Is there a way to change the page setup to A4 for all pages easily? Is it
possible to do by code or, even better, inside Visio somewhere?

Thanks!
 
P

Paul Herber

Hi,
Is there a way to change the page setup to A4 for all pages easily? Is it
possible to do by code or, even better, inside Visio somewhere?

Sub toA4()
For Page = 1 To Application.ActiveDocument.Pages.Count

Application.ActiveDocument.Pages.Item(Page).PageSheet.CellsSRC(visSectionObject,
visRowPage, visPageWidth).FormulaU = "210 mm"

Application.ActiveDocument.Pages.Item(Page).PageSheet.CellsSRC(visSectionObject,
visRowPage, visPageHeight).FormulaU = "297 mm"

Application.ActiveDocument.Pages.Item(Page).PageSheet.CellsSRC(visSectionObject,
visRowPage, visPageDrawSizeType).FormulaU = "5"
Next Page
End Sub
 

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