Document Level
Event | Description | 365 | 16 | 13 | 10 | 07 |
BuildingBlockInsert | Y | Y | Y | Y | Y | |
Close | Occurs when a document is closed. This is raised in situations where a document is not actually going to be closed. The event is fired before the "do you want to save" dialog is displayed. There is also an Application_DocumentBeforeClose event ? | Y | Y | Y | Y | Y |
ContentControlAfterAdd | Occurs after a content control is added to a document | Y | Y | Y | Y | Y |
ContentControlBeforeContentUpdate | Y | Y | Y | Y | Y | |
ContentControlBeforeDelete | Y | Y | Y | Y | Y | |
ContentControlBeforeStoreUpdate | Y | Y | Y | Y | Y | |
ContentControlOnEnter | Y | Y | Y | Y | Y | |
ContentControlOnExit | Y | Y | Y | Y | Y | |
New | Occurs when a new document based on the template is created. This will only run when the code is stored in the template. | Y | Y | Y | Y | Y |
Open | Occurs when a document is opened. | Y | Y | Y | Y | Y |
Sync | Occurs when the local copy of a document is synchronized with a copy on the server that is part of a document workspace. | Y | Y | Y | Y | Y |
XMLAfterInsert | Occurs when a user adds a new XML element to a document. If more than one element is added to the document at the same time (for example cutting and pasting XML), the event fires for each element that is inserted. See below | Y | Y | Y | Y | Y |
XMLBeforeDelete | Occurs when a user deletes an XML element from a document. If more than one element is added to the document at the same time (for example when cutting and pasting XML), the event fires for each element that is inserted. See below | Y | Y | Y | Y | Y |
Event Procedures
Private Sub Document_Close()
End Sub
Private Sub Document_New()
End Sub
Private Sub Document_Open()
End Sub
Private Sub Document_Sync(ByVal SyncEventType As Office.MsoSyncEventType)
End Sub
Private Sub Document_XMLAfterInsert(ByVal NewXMLNode As XMLNode, _
ByVal InUndoRedo As Boolean)
End Sub
This is raised after the user adds a new XML element to the document
If multiple XML elements are added at the same time the event is raised for each element.
The node object for the newly added element is passed as a parameter
It also passed an inUndoRedo boolean parameter indicating it iw was added because of an undo or a redo
Private Sub Document_XMLBeforeDelete(ByVal DeletedRange As Range, _
ByVal OldXMLNode As XMLNode, _
ByVal InUndoRedo As Boolean)
End Sub
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext