Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Occurs when opening a document.
Syntax
expression.DocumentOpen (Doc)
expression A variable that represents an Application object.
Parameters
| Name | Required/Optional | Data type | Description |
|---|---|---|---|
| Doc | Required | 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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.