Bookmark.SelectionChange Olay

Oluşur, seçimin içinde Bookmark değişiklikleri denetler.

Ad alanı:  Microsoft.Office.Tools.Word
Derleme:  Microsoft.Office.Tools.Word (Microsoft.Office.Tools.Word.dll içinde)

Sözdizimi

'Bildirim
Event SelectionChange As SelectionEventHandler
event SelectionEventHandler SelectionChange

Notlar

Ya da içinden seçim değiştiğinde bu olayı Bookmark denetim.

Örnekler

Aşağıdaki kod örneği ekler bir Bookmark kontrol belgesine metinle ve oluşturur bir SelectionChange olay işleyicisi.Yer işareti içinde imleci hareket ettiğinde, bir ileti kutusu görüntülenir.

Bu örnek, belge düzeyinde özelleştirme içindir

WithEvents Bookmark5 As Microsoft.Office.Tools.Word.Bookmark

Private Sub BookmarkSelectionChange()
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Bookmark5 = Me.Controls.AddBookmark(Me.Paragraphs(1).Range, _
        "Bookmark5")
    Bookmark5.Text = "This is a sample bookmark."
End Sub

Private Sub Bookmark5_SelectionChange(ByVal sender As Object, _
    ByVal e As Microsoft.Office.Tools.Word.SelectionEventArgs) _
    Handles Bookmark5.SelectionChange
    MessageBox.Show("The selection has changed within Bookmark1.")
End Sub
Microsoft.Office.Tools.Word.Bookmark bookmark5;

private void BookmarkSelectionChange()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    bookmark5 = this.Controls.AddBookmark(this.Paragraphs[1]
        .Range, "bookmark5");
    bookmark5.Text = "This is a sample bookmark.";
    bookmark5.SelectionChange += new Microsoft.Office.Tools.Word.SelectionEventHandler(bookmark5_SelectionChange);
}

void bookmark5_SelectionChange(object sender, Microsoft.Office.Tools.Word.SelectionEventArgs e)
{
    MessageBox.Show("The selection has changed within bookmark1.");
}

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

Bookmark Arabirim

Microsoft.Office.Tools.Word Ad Alanı