View Single Post
 
Old 05-05-2019, 10:21 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,969
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

wdPageFitBestFit has a value of 2 but when you set the line
ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitBestFit
word looks at the window size and sets the page zoom to best fit that window. Which means the return value of .PageFit is going to be a specific zoom number rather than 2. The more useful setting to hang your test on would be the .pagecolumns since bestfit is changing that to 1 and this would be consistent regardless of the window or paper size.

Try...
If ActiveWindow.ActivePane.View.Zoom.PageColumns = 1 Then
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote