XMLNodes.Parent Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
property System::Object ^ Parent { System::Object ^ get(); };
public object Parent { get; }
member this.Parent : obj
Public ReadOnly Property Parent As Object
Property Value
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 void DisplayParentName()
{
Word.Document document1 =
(Word.Document)this.SampleInsertNodes.Parent;
MessageBox.Show("The parent of SampleInsertNodes" +
" is named " + document1.Name);
}
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