Evento Action.Click

Ocorre quando a ação no menu de marca inteligente é clicada.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (em Microsoft.Office.Tools.Word.dll)

Sintaxe

'Declaração
Event Click As ActionClickEventHandler
event ActionClickEventHandler Click

Comentários

Para obter mais informações sobre tratamento eventos, consulte Consumindo Eventos.

Exemplos

O exemplo de código a seguir demonstra um manipulador para o Click de evento. O manipulador de eventos exibe a posição de início e fim do termo reconhecido de marca inteligente. Este exemplo de código é parte de um exemplo maior fornecido para 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());
}

Segurança do .NET Framework

Consulte também

Referência

Action Interface

Namespace Microsoft.Office.Tools.Word