Open Event

Applies To

Document object.

Description

Occurs when a document is opened.

Syntax

Private Sub Document_Open( )

Remarks

If the event procedure is stored in a template, the procedure will run when a new document based on that template is opened and when the template itself is opened as a document.

See Also

Close event, DocumentChange event, New event, Open method, Quit event.

Example

This example displays a message when a document is opened.

Private Sub Document_Open()
    Msgbox "This document is copywrited"
End Sub