XMLNodes::BeforeDelete Event

 

Occurs when the user deletes a Microsoft.Office.Interop.Word::XMLNode or descendent node from the collection, before the control is deleted.

Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

event NodeInsertAndDeleteEventHandler^ BeforeDelete {
	void add(NodeInsertAndDeleteEventHandler^ value);
	void remove(NodeInsertAndDeleteEventHandler^ value);
}

If the InUndoRedo parameter is true, you should not change the XML in the document.

The following code example demonstrates event handlers for the AfterInsert and BeforeDelete events. The code displays a message box before a Microsoft.Office.Interop.Word::XMLNode is deleted from the document and after a Microsoft.Office.Interop.Word::XMLNode is added to the document. The example also uses the Add method to add a new element to an XMLNodes collection at a specified range and programmatically raise the AfterInsert event. This example assumes that the current document contains an XMLNodes collection named SampleInsertNodes, which has a parent XMLNode named SampleNode.

No code example is currently available or this language may not be supported.
Return to top
Show: