WD2000: Zoom.PageFit Property Returns Unexpected Value for wdPageFitFullPage (210109)
The information in this article applies to:
This article was previously published under Q210109 SYMPTOMS
When you try to run a Visual Basic for Applications macro that changes the Zoom.PageFit property of a Web page, there is no error and the PageFit property may return a seemingly incorrect value when set using the wdPageFitFullPage constant.
CAUSE
This behavior is by design. Because a Web page zoom factor cannot be set to Full Page, the page is set to an allowed zoom value, and no error is returned.
Allowed zoom values are:
10%
25%
50%
75%
100%
150%
200%
500%
For example, the following macro sets a document view to Web Layout and then attempts to set the Zoom property to wdPageFitFullPage:
Sub SetWebPageZoom()
With ActiveWindow.ActivePane.View
.Type = wdWebView ' Set view to Web Layout.
' Numeric value for wdPageFitFullPage constant is 2.
.Zoom.PageFit = wdPageFitFullPage
' The following may return 0.
MsgBox "Zoom Page fit type is " & (.Zoom.PageFit)
End With
End Sub
REFERENCESFor additional information about getting help with Visual Basic for Applications, click the article number below
to view the article in the Microsoft Knowledge Base:
226118 OFF2000: Programming Resources for Visual Basic for Applications
Modification Type: | Major | Last Reviewed: | 12/6/2000 |
---|
Keywords: | kbprb KB210109 |
---|
|