XMLNodes.Parent プロパティ
XMLNodes コレクションを含む文書を表す Microsoft.Office.Interop.Word.Document を取得します。
名前空間: Microsoft.Office.Tools.Word
アセンブリ: Microsoft.Office.Tools.Word (Microsoft.Office.Tools.Word.dll 内)
構文
'宣言
ReadOnly Property Parent As Object
Object Parent { get; }
プロパティ値
型 : System.Object
XMLNodes コレクションを含む文書を表す Microsoft.Office.Interop.Word.Document。
例
次のコード例は、Parent プロパティを使用して XMLNodes コレクションの親文書の名前を表示します。この例では、現在の文書に SampleInsertNodes という XMLNodes コントロールが含まれていることが前提となっています。
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 セキュリティ
- 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。