ApplicationEvents4_ProtectedViewWindowBeforeCloseEventHandler Delegate

A Delegate type used to add an event handler for the ProtectedViewWindowBeforeClose event. The ProtectedViewWindowBeforeClose event occurs immediately before a protected view window or a document in a protected view window 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_ProtectedViewWindowBeforeCloseEventHandler ( _
    PvWindow As ProtectedViewWindow, _
    CloseReason As Integer, _
    <OutAttribute> ByRef Cancel As Boolean _
)
'Usage
Dim instance As New ApplicationEvents4_ProtectedViewWindowBeforeCloseEventHandler(AddressOf HandlerMethod)
[ComVisibleAttribute(false)]
public delegate void ApplicationEvents4_ProtectedViewWindowBeforeCloseEventHandler(
    ProtectedViewWindow PvWindow,
    int CloseReason,
    out bool Cancel
)

Parameters

  • Cancel
    Type: System.Boolean%
    false when the event occurs. If the event procedure sets this argument to true, the window does not close when the procedure is finished.
    If the ProtectedViewWindowsBeforeClose event is called as part of the Edit(Object%, Object%, Object%) method, setting Cancel to true produces no action.

See Also

Reference

Microsoft.Office.Interop.Word Namespace