Document.Shutdown Event (2007 System)
Updated: July 2008
Occurs when the document host item shuts down.
Assembly: Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)
In a document-level customization, the application domain for the assembly unloads when the document host item shuts down.
In an application-level add-in, the application domain does not unload when the document host item shuts down. Also, the underlying document object is no more available. To access the document before it shuts down use CloseEvent instead.
The following code example adds a new event handler that displays a message that shows that the document is shutting down.
This example is for a document-level customization.
- 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.