WD2000: Zoom.PageFit Property Returns Unexpected Value for wdPageFitFullPage

ID: Q210109


The information in this article applies to:


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 


REFERENCES

For more information about getting help with Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:

Q226118 OFF2000: Programming Resources for Visual Basic for Applications

Additional query words: vba


Keywords          : kbdta kbwordvba wd2000 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: May 13, 1999