Centering a page in the current window

Started by fchi, November 30, 2010, 06:00:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fchi

Hi all,

I'm trying to figure out how to center a page in the current window, ideally using a macro.  I've found tons of documentation about centering shapes, but what I'm actually after is zooming the document to 100% and then centering the document within the window (i.e. so both scrollbars are precisely centered). 

I have Visio 2007.

Thanks!

wapperdude

Turns out, this is one of those instances where the macro recorder helps.  Here's the result:

Sub CntrPage()

    Application.ActiveWindow.ViewFit = visFitPage

End Sub



You don't need the "application.", just begin with ActiveWindow

Wapperdude
Visio 2019 Pro

fchi