OwnerDocument Property

Microsoft Word Visual Basic

OwnerDocument Property

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

expression.OwnerDocument

expression    Required. An expression that returns a Document object.

Remarks

The OwnerDocument property returns the same results as the Parent property.

Example

The following example provides access to the parent document of the specified element.

    Sub GetParentDocument(Element As XMLNode)
    Dim objDoc As Document
    
    Set objDoc = Element.OwnerDocument
End Sub