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
Object Parent { get; }
Özellik Değeri
Tür: System.Object
Üst nesne, Bookmark denetim.
Örnekler
Aşağıdaki kod örneği ekler bir Bookmark denetimi ile ilk paragrafa metin eklenir ve yer işaretinin üst bir ileti kutusunda görüntüler.
Bu örnek, belge düzeyinde özelleştirme içindir
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üvenilen Koddan Kitaplıkları Kullanma.