Document Level

EventDescription36516131007
BuildingBlockInsert YYYYY
CloseOccurs 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 ?YYYYY
ContentControlAfterAddOccurs after a content control is added to a documentYYYYY
ContentControlBeforeContentUpdate YYYYY
ContentControlBeforeDelete YYYYY
ContentControlBeforeStoreUpdate YYYYY
ContentControlOnEnter YYYYY
ContentControlOnExit YYYYY
NewOccurs when a new document based on the template is created. This will only run when the code is stored in the template.YYYYY
OpenOccurs when a document is opened.YYYYY
SyncOccurs when the local copy of a document is synchronized with a copy on the server that is part of a document workspace.YYYYY
XMLAfterInsertOccurs 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 belowYYYYY
XMLBeforeDeleteOccurs 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 belowYYYYY

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