CustomXMLPart 事件 (Office)CustomXMLPart.NodeAfterDelete event (Office)

CustomXMLPart对象中删除节点之后发生。Occurs after a node is deleted in a CustomXMLPart object.

语法Syntax

表达式NodeAfterDelete(OldNodeOldParentNodenodedeletedeventargs.oldnextsiblingInUndoRedo)expression.NodeAfterDelete (OldNode, OldParentNode, OldNextSibling, InUndoRedo)

_表达式_一个返回**CustomXMLPart** 对象的表达式。expression An expression that returns a CustomXMLPart object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
OldNodeOldNode 必需Required CustomXMLNodeCustomXMLNode 与刚刚从CustomXMLPart对象中删除的节点相对应。Corresponds to the node that 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.
OldParentNodeOldParentNode 必需Required CustomXMLNodeCustomXMLNode 对应于 OldNode 原有的父节点。Corresponds to the former parent node of OldNode.
Nodedeletedeventargs.oldnextsiblingOldNextSibling 必需Required CustomXMLNodeCustomXMLNode 对应于 OldNode 原有的下一个同级项。Corresponds to the former next sibling of OldNode.
InUndoRedoInUndoRedo 必需Required BooleanBoolean 如果节点作为用户的撤消/恢复操作的一部分插入,则返回 TrueReturns 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.

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

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.