J
jdfunk
Hello all,
I'm trying to create a macro that will set the zoom at Fit-to-Page every
time you click on a sheet. So far I've been able to get the macro to set the
zoom for all sheets at Fit-to-Page when the document is first opens up, but I
need the macro to continue working as you browse through the document. Here's
what I have so far. Does anyone have any suggestions as how to get the macro
to run every time I select a new tab?
Public Sub FitToPageAll()
Dim PageToIndex As Visio.Page
Dim curPage As Visio.Page
Set curPage = ActivePage
For Each PageToIndex In ActiveDocument.Pages
ActiveWindow.Page = ActiveDocument.Pages(PageToIndex.Index).Name
ActiveWindow.Zoom = -1
Next
ActiveWindow.Page = curPage
End Sub
I'm trying to create a macro that will set the zoom at Fit-to-Page every
time you click on a sheet. So far I've been able to get the macro to set the
zoom for all sheets at Fit-to-Page when the document is first opens up, but I
need the macro to continue working as you browse through the document. Here's
what I have so far. Does anyone have any suggestions as how to get the macro
to run every time I select a new tab?
Public Sub FitToPageAll()
Dim PageToIndex As Visio.Page
Dim curPage As Visio.Page
Set curPage = ActivePage
For Each PageToIndex In ActiveDocument.Pages
ActiveWindow.Page = ActiveDocument.Pages(PageToIndex.Index).Name
ActiveWindow.Zoom = -1
Next
ActiveWindow.Page = curPage
End Sub