ApplicationEvents4_DocumentBeforeCloseEventHandler Delegate

Definition

A Delegate type used to add an event handler for the DocumentBeforeClose event. The DocumentBeforeClose event occurs immediately before any open document closes.

C#
[System.Runtime.InteropServices.ComVisible(false)]
public delegate void ApplicationEvents4_DocumentBeforeCloseEventHandler(Document Doc, out bool Cancel);

Parameters

Doc
Document

The document that's being closed.

Cancel
Boolean

False when the event occurs. If the event procedure sets this argument to True, the document doesn't close when the procedure is finished.

Attributes

Applies to

Product Versions
Word primary interop assembly Latest