DocumentOpen Event

Microsoft Publisher Visual Basic

Private Sub object_DocumentOpen(ByVal Doc As Document)

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

Doc    Document. The document that's being opened.

Example

This example displays a message with the document's name when opening a document.

Private Sub appPub_DocumentOpen(ByVal Doc As Document)
    MsgBox "Please wait. " & Doc.Name & " is opening."
End Sub