Share via


Document.Open Event

Publisher Developer Reference

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, 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.)

Visual Basic for Applications
  Private Sub Document_Open()
    MsgBox "This publication is copyrighted."
End Sub

See Also