XMLNode.NextSibling Property

Word Developer Reference

Returns an XMLNode object that represents the next element in the document that is at the same level as the specified element.

Syntax

expression.NextSibling

expression   An expression that returns an XMLNode object.

Remarks

If the specified element is the last element in the XMLNodes collection, this property returns Nothing.

Example

The following example returns the next sibling element to the second element in the active document.

Visual Basic for Applications
  Dim objNode As XMLNode

Set objNode = ActiveDocument.XMLNodes(2).NextSibling

See Also