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)

'Declaration
<ComVisibleAttribute(False)> _
Public Delegate Sub ApplicationEvents4_DocumentBeforeCloseEventHandler ( _
	Doc As Document, _
	<OutAttribute> ByRef Cancel As Boolean _
)
'Usage
Dim instance As New ApplicationEvents4_DocumentBeforeCloseEventHandler(AddressOf HandlerMethod)

Parameters

Doc
Type: Microsoft.Office.Interop.Word.Document

The document that's being closed.

Cancel
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.

Show: