WindowPageChange Event

Microsoft Publisher Visual Basic

Private Sub object_WindowPageChange(ByVal Vw As View)

object    An object of type Application declared with events in a class module. For more information about using events with the Application object, see Using Events with the Application Object.

vw    The new view that includes the page to which the view has been switched.

Example

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.

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