View Single Post
 
Old 05-06-2019, 06:09 PM
eduzs eduzs is offline Windows 10 Office 2010 32bit
Expert
 
Join Date: May 2017
Posts: 266
eduzs is on a distinguished road
Default

Solved! The problem was that the page columns / rows are not reset when the pagefit/bestfit adjustment is set.
So It is necessary to set it back again to 1 when toggling to PageFitBestFIt
Quote:
Sub Toggle_View_Zoom()

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

End Sub
__________________
Backup your original file before doing any modification.
Reply With Quote