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

该事件发生在 CustomXMLPart 对象中插入节点后。Occurs after a node is inserted in a CustomXMLPart object.


表达式NodeAfterInsert(Nodeinsertedeventargs.newnode, InUndoRedo)expression.NodeAfterInsert(NewNode, InUndoRedo)

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


名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
Nodeinsertedeventargs.newnodeNewNode 必需Required CustomXMLNodeCustomXMLNode 对应于刚刚添加到 CustomXMLPart 对象的节点。Corresponds to the node just added to the CustomXMLPart object. 请注意, 如果仅将子树添加到文档中, 则此节点可能具有子级。Note that this node may have children if a subtree was just added to the document.
InUndoRedoInUndoRedo 必需Required BooleanBoolean 如果节点作为用户的撤消/恢复操作的一部分插入,则返回 TrueReturns True if the node was inserted as part of an Undo/Redo action by the user.


以下示例将显示一条消息,告知用户插入节点的结果。The following example displays a message telling the user the results of inserting the node.

Sub CustomXMLParts_NodeAfterInsert(newNode As CustomXMLNode, boolInUndoRedo As Boolean) 
   MsgBox ("The node " & newNode.BaseName & " was just inserted.") 
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.