CustomXMLPart.NodeAfterDelete Event

Office Developer Reference

Occurs after a node is deleted in a CustomXMLPart object.

Aa433589.vs_note(en-us,office.12).gif  Note
References to DTDs from custom XML parts are not supported. DTD references in custom XML parts will not resolve, and custom XML parts containing DTD references generate an exception when an attempt is made to save the file's content to a flat XML file.

Syntax

expression.NodeAfterDelete(OldNode, OldParentNode, OldNextSibling, InUndoRedo)

expression   An expression that returns a CustomXMLPart object.

Parameters

Name Required/Optional Data Type Description
OldNode Required CustomXMLNode Corresponds to the node which was just removed from the CustomXMLPart object. Note that this node may have children, if a subtree is being removed from the document. Also, this node will be a "disconnected" node in that you can query down from the node, but you cannot query up the tree – the node appears to exist alone.
OldParentNode Required CustomXMLNode Corresponds to the former parent node of OldNode.
OldNextSibling Required CustomXMLNode Corresponds to the former next sibling of OldNode.
InUndoRedo Required Boolean Returns TRUE if the node was inserted as part of an Undo/Redo action by the user.

Example
The following example displays a message telling the user the results of deleting the node.

Visual Basic for Applications
  Sub CustomXMLParts_NodeAfterDelete(newNode As CustomXMLNode, boolInUndoRedo As Boolean)
   MsgBox ("The node " & newNode.BaseName & " was just deleted.")
End Sub

See Also