Setting Visio Viewer Zoom to a page

Started by contact_ankit86, September 27, 2013, 06:32:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

contact_ankit86

Hi All,

I am looking for a VBA code that sets a Visio Viewer Zoom to a page.

There is a property .Zoom but this takes a double value. How can i set tit to a page view..?

Any idea..

Jumpy

#1
Try the Default 0.6 or the special -1 to adjust window to pagesize.

dgoogle

Try this snipt, it changes all sheets to 'Fit in Page'.


Public Sub FitToPageAll()
    Dim PageToIndex As Visio.Page
    Dim curPage As Visio.Page

    Set curPage = ActivePage

    ' loop through all the pages you have and set the zoom factor
    For Each PageToIndex In ActiveDocument.Pages
        ActiveWindow.Page = ActiveDocument.Pages(PageToIndex.Index).Name
        ActiveWindow.Zoom = -1
    Next
   
    ActiveWindow.Page = curPage
End Sub