View Single Post
 
Old 05-05-2019, 07:04 PM
eduzs eduzs is offline Windows 10 Office 2010 32bit
Expert
 
Join Date: May 2017
Posts: 260
eduzs is on a distinguished road
Default Toggle between pagecolumns / pagefit view

Hello!
I have this code that is toggle between pagecolumns / pagefit view.
But it is not working properly.
It only works the first time it runs.
Any sugestions? Thanks.

Code:
Sub View_Zoom_Alternate()

If ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitBestFit Then
    With ActiveWindow.ActivePane.View.Zoom
        .PageColumns = 5
        .PageRows = 2
    End With
Else
    ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitBestFit
End If

End Sub
Reply With Quote