This documentation is archived and is not being maintained.

Application.WindowPageChange Event

Office 2007
Occurs when switching the view from one page to another page in a publication.


expression.WindowPageChange(Vw, )

expression   A variable that represents an Application object.


NameRequired/OptionalData TypeDescription
VwRequiredViewThe new view that includes the page to which the view has been switched.


This example changes the view to display the whole page when switching to a new page in a publication. For this example to work, you must place the WithEvents declaration in the General Declarations section of a class module and run the InitializeEvents routine.

Visual Basic for Applications
Private WithEvents PubApp As Publisher.Application

Sub InitializeEvents()
    Set PubApp = Publisher.Application
End Sub

Private Sub PubApp_WindowPageChange(ByVal Vw As View)
    Vw.Zoom = pbZoomWholePage
End Sub