Document.Open event (Publisher)

Occurs when a publication is opening.

Syntax

expression.Open

expression A variable that represents a Document object.

Remarks

To access the Document object events, declare a Document object variable in the General Declarations section of a class module, and then set the variable equal to the Document object for which you want to access events.

For more information about using events with the Document object, see Using events with the Document object.

Example

This example displays a message when a publication is opened. The procedure can be stored in the ThisDocument module of a publication.

Private Sub Document_Open() 
 MsgBox "This publication is copyrighted." 
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.