Share via


XMLNodes.Parent Property (2007 System)

Gets a Document that represents the document containing the XMLNodes collection.

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 Parent As Object
'Usage
Dim instance As XMLNodes 
Dim value As Object 

value = instance.Parent
[BrowsableAttribute(false)]
public Object Parent { get; }
[BrowsableAttribute(false)]
public:
property Object^ Parent {
    Object^ get ();
}
public function get Parent () : Object

Property Value

Type: System.Object
A Document that represents the document containing the XMLNodes collection.

Examples

The following code example uses the Parent property to display the name of the parent document of an XMLNodes collection. This example assumes that the current document contains an XMLNodes control named SampleInsertNodes.

Private Sub DisplayParentName()
    Dim document1 As Word.Document = _
        CType(Me.SampleInsertNodes.Parent, Word.Document)

    MsgBox("The parent of SampleInsertNodes" & _
        " is named " & document1.Name)

End Sub
private void DisplayParentName()
{
    Word.Document document1 =
        (Word.Document)this.SampleInsertNodes.Parent;

    MessageBox.Show("The parent of SampleInsertNodes" +
        " is named " + document1.Name);
}

.NET Framework Security

See Also

Reference

XMLNodes Class

XMLNodes Members

Microsoft.Office.Tools.Word Namespace