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)
Syntax
'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)
[ComVisibleAttribute(false)]
public delegate void ApplicationEvents4_DocumentBeforeCloseEventHandler(
Document Doc,
out bool Cancel
)
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.