Share via


Action.Click, événement

Se produit lorsque l'utilisateur clique sur l'action dans le menu de la balise active.

Espace de noms :  Microsoft.Office.Tools.Word
Assembly :  Microsoft.Office.Tools.Word (dans Microsoft.Office.Tools.Word.dll)

Syntaxe

'Déclaration
Event Click As ActionClickEventHandler
event ActionClickEventHandler Click

Notes

Pour plus d'informations sur la gestion d'événements, consultez Consommation d'événements.

Exemples

L'exemple de code suivant illustre un gestionnaire pour l'événement Click. Le gestionnaire d'événements affiche la position de début et de fin du terme de balise active reconnu. Cet exemple de code fait partie d'un exemple plus complet, fourni pour Action.

Private Sub DisplayAddress_Click(ByVal sender As Object, _
    ByVal e As Microsoft.Office.Tools.Word.ActionEventArgs) _
    Handles displayAddress.Click

    Dim termStart As Integer = e.Range.Start
    Dim termEnd As Integer = e.Range.End
    MsgBox("The recognized text '" & e.Text & _
            "' begins at position " & termStart & _
            " and ends at position " & termEnd)
End Sub
void displayAddress_Click(object sender,
    Microsoft.Office.Tools.Word.ActionEventArgs e)
{
    int termStart = e.Range.Start;
    int termEnd = e.Range.End;
    System.Windows.Forms.MessageBox.Show("The recognized text '" + e.Text +
        "' begins at position " + termStart.ToString() +
        " and ends at position " + termEnd.ToString());
}

Sécurité .NET Framework

Voir aussi

Référence

Action Interface

Microsoft.Office.Tools.Word, espace de noms