Share via


DocumentOpen Event [Publisher 2003 VBA Language Reference]

Occurs when opening a document.

Private Subobject**_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 .

DocDocument. 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

Applies to | Application Object