Evento Action.BeforeCaptionShow

Si verifica dopo che si è fatto clic sull'icona smart tag e prima che venga visualizzato il menu Smart tag.

Spazio dei nomi:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Sintassi

'Dichiarazione
Event BeforeCaptionShow As BeforeCaptionShowEventHandler
event BeforeCaptionShowEventHandler BeforeCaptionShow

Note

L'evento offre l'opportunità di modificare la didascalia smart tag in base al contesto.

Per ulteriori informazioni sulla gestione degli eventi, vedere Utilizzo degli eventi.

Esempi

Nell'esempio di codice riportato di seguito viene illustrato un gestore per l'evento BeforeCaptionShow. Il gestore eventi modifica la didascalia di menu dell'azione. Questo esempio di codice fa parte di un esempio più esaustivo fornito per Action.

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

    Dim clickedAction As Microsoft.Office.Tools.Word.Action = _
        TryCast(sender, Microsoft.Office.Tools.Word.Action)

    If clickedAction IsNot Nothing Then
        clickedAction.Caption = "Display the location of " & e.Text
    End If
End Sub
void displayAddress_BeforeCaptionShow(object sender,
    Microsoft.Office.Tools.Word.ActionEventArgs e)
{
    Microsoft.Office.Tools.Word.Action clickedAction =
        sender as Microsoft.Office.Tools.Word.Action;

    if (clickedAction != null)
    {
        clickedAction.Caption = "Display the location of " +
            e.Text;
    }
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

Action Interfaccia

Spazio dei nomi Microsoft.Office.Tools.Word