This documentation is archived and is not being maintained.

Range.XMLNodes Property (Word)

Office 2010

Returns an XMLNodes collection that represents the XML elements in the specified range—including any elements that are only partially within the range. Read-only.

expression .XMLNodes

expression An expression that returns a Range object.

The following example accesses the XML elements that are contained within the first 200 characters of the active document.

Dim objRange As Range 
Dim objNode As XMLNode 
 
Set objRange = ActiveDocument.Range(1, 200) 
Set objNode = objRange.XMLNodes.Item(1)
Show: