XMLNode.OwnerDocument property (Word)

Returns a Document object that represents the parent document of the specified XML element.

Syntax

expression. OwnerDocument

expression An expression that returns an 'XMLNode' object.

Example

The following example accesses the parent document of the first XML element in the active selection.

Dim objDoc As Document 
 
Set objDoc = Selection.XMLNodes(1).OwnerDocument

See also

XMLNode Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.