Occurs immediately before the document closes.
Assembly: Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
The event occurs before the document closes. To keep the document from closing, set the Cancel argument of the provided CancelEventArgs object to true.
The following code example displays a message box before the document closes. To use this example, run it from the ThisDocument class in a document-level project.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.