PreviousSibling 属性 (Word)XMLNode.PreviousSibling property (Word)

返回一个XMLNode对象, 该对象代表文档中与指定元素处于相同级别的上一个元素。Returns an XMLNode object that represents the previous element in the document that is at the same level as the specified element.


expressionexpression. PreviousSibling

_表达式_一个返回 "XMLNode" 对象的表达式。expression An expression that returns an 'XMLNode' object.


如果指定元素是XMLNodes集合中的第一个元素, 则此属性返回NothingIf the specified element is the first element in the XMLNodes collection, this property returns Nothing.


以下示例返回活动文档中第三个元素的前一个同级元素。The following example returns the previous sibling element to the third element in the active document.

Dim objNode As XMLNode 
Set objNode = ActiveDocument.XMLNodes(3).PreviousSibling

另请参阅See also

XMLNode 对象XMLNode Object

支持和反馈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.