Bookmark.Parent Özellik
Üst nesnesi alır Bookmark Denetim.
Ad alanı: Microsoft.Office.Tools.Word
Derleme: Microsoft.Office.Tools.Word (Microsoft.Office.Tools.Word.dll içinde)
Sözdizimi
'Bildirim
ReadOnly Property Parent As Object
Get
Object Parent { get; }
Özellik Değeri
Tür: System.Object
Üst nesnesi Bookmark Denetim.
Örnekler
Aşağıdaki kod örneği ekler bir Bookmark ilk paragrafa metin denetimi ve yer üstü bir ileti kutusu içinde görüntüler.
Bu örnek, bir belge düzeyinde özelleştirme için bulunur.
Private Sub BookmarkParent()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
Bookmark1.Text = "This is sample bookmark text"
MessageBox.Show("The parent of bookmark1 is : " & _
Bookmark1.Parent.ToString)
End Sub
private void BookmarkParent()
{
this.Paragraphs[1].Range.InsertParagraphBefore();
Microsoft.Office.Tools.Word.Bookmark bookmark1 =
this.Controls.AddBookmark(this.Paragraphs[1].Range,
"bookmark1");
bookmark1.Text = "This is sample bookmark text";
MessageBox.Show("The parent of bookmark1 is : " +
bookmark1.Parent.ToString());
}
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. kısmen güvenilir kod tarafından Kitaplıklar kullanma.