XMLNode.OwnerDocument Property (2007 System)
Gets a Document that represents the parent document of the specified XMLNode control.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property OwnerDocument As Document
'Usage
Dim instance As XMLNode
Dim value As Document
value = instance.OwnerDocument
[BrowsableAttribute(false)]
public Document OwnerDocument { get; }
[BrowsableAttribute(false)]
public:
property Document^ OwnerDocument {
Document^ get ();
}
public function get OwnerDocument () : Document
Property Value
Type: Document
A Document object that represents the parent document of the specified XMLNode control.
Remarks
The OwnerDocument property returns the same result as the Parent property.
Examples
The following code example uses the OwnerDocument property to display the name of the owner document of an XMLNode control. This example assumes that the current document contains an XMLNode named CustomerNode.
Private Sub DisplayDocumentName()
Dim document1 As Word.Document = Me.CustomerNode.OwnerDocument
MsgBox("The owner document of '" & Me.CustomerNode.BaseName & _
"' is named " & document1.Name)
End Sub
private void DisplayDocumentName()
{
Word.Document document1 =
this.CustomerNode.OwnerDocument;
MessageBox.Show("The owner document of '" +
this.CustomerNode.BaseName + "' is named " +
document1.Name);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.