Action.Click (Evento) (2007 System)

Actualización: noviembre 2007

Aparece cuando se hace clic en la acción del menú de etiquetas inteligentes.

Espacio de nombres:  Microsoft.Office.Tools.Word
Ensamblado:  Microsoft.Office.Tools.Word.v9.0 (en Microsoft.Office.Tools.Word.v9.0.dll)

Sintaxis

Public Event Click As ActionClickEventHandler

Dim instance As Action
Dim handler As ActionClickEventHandler

AddHandler instance.Click, handler
public event ActionClickEventHandler Click

Comentarios

Para obtener más información acerca del control de eventos, vea Utilizar eventos.

Ejemplos

En el ejemplo de código siguiente se muestra un controlador para el evento Click. El controlador de eventos muestra las posiciones de inicio y fin del término reconocido de la etiqueta inteligente. Este ejemplo de código forma parte de un ejemplo más extenso referente a la clase Action.

Se trata de un ejemplo para una personalización en el nivel del documento.

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());
}

Permisos

Vea también

Referencia

Action (Clase)

Action (Miembros)

Microsoft.Office.Tools.Word (Espacio de nombres)