CustomXMLNode Object (Office)
Published: July 09, 2012
Represents an XML node in a tree in a document. The CustomXMLNode object is a member of the CustomXMLNodes collection.
The following example selects a single node from a CustomXMLPart object by using an XPath expression and assigns it to a CustomXMLNode object.
Sub CustomXmlNodes() Dim cxp1 As CustomXMLPart Dim cxn As CustomXMLNode With ActiveDocument ' Returns the first custom xml part with the given root namespace. Set cxp1 = .CustomXMLParts("urn:invoice:namespace") ' Get the first node matching the XPath expression. Set cxn = cxp1.SelectSingleNode("//*[@quantity < 4]") End With End Sub