Document.Shutdown Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the document host item shuts down.
public:
event EventHandler ^ Shutdown;
event EventHandler Shutdown;
member this.Shutdown : EventHandler
Event Shutdown As EventHandler
Event Type
Remarks
This is the last event to be called in a Document as it unloads. Use this event for any additional clean up.
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.