This documentation is archived and is not being maintained.

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)

<ComVisibleAttribute(False)> _
Public Delegate Sub ApplicationEvents4_ProtectedViewWindowBeforeCloseEventHandler ( _
	PvWindow As ProtectedViewWindow, _
	CloseReason As Integer, _
	<OutAttribute> ByRef Cancel As Boolean _
Dim instance As New ApplicationEvents4_ProtectedViewWindowBeforeCloseEventHandler(AddressOf HandlerMethod)


Type: Microsoft.Office.Interop.Word.ProtectedViewWindow
The protected view window that is closed.
Type: System.Int32
A constant in the WdProtectedViewCloseReason enumeration that specifies the reason the protected view window is closed.
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.