A Delegate type used to add an event handler for the XMLAfterInsert event. The XMLAfterInsert event occurs when a user adds a new XML element to a document.
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
[ComVisibleAttribute(false)] public delegate void DocumentEvents2_XMLAfterInsertEventHandler( XMLNode NewXMLNode, bool InUndoRedo )
If the InUndoRedo parameter is True, never change the XML in a document while the XMLAfterInsert and XMLBeforeDelete events are running.
If the InUndoRedo parameter is False, you can insert and delete the XML in the document, but be careful that the XMLAfterInsert and XMLBeforeDelete events will not try to cancel each other out, causing an infinite loop. You can prevent infinite loops by using a global Boolean variable and check for that at the beginning of the error handler.