This documentation is archived and is not being maintained.

ApplicationEvents4_DocumentBeforeCloseEventHandler Delegate

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

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

public delegate void ApplicationEvents4_DocumentBeforeCloseEventHandler(
	Document Doc,
	out bool Cancel


Type: Microsoft.Office.Interop.Word.Document
The document that's being closed.
Type: System.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.