This documentation is archived and is not being maintained.

Action.BeforeCaptionShow Event

Occurs after the user clicks the smart tags icon, and before the smart tag menu is displayed.

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)

public event BeforeCaptionShowEventHandler BeforeCaptionShow

This event gives you an opportunity to change the smart tag caption based on context.

The following code example demonstrates a handler for the BeforeCaptionShow event. The event handler modifies the menu caption of the action. This code example is part of a larger example provided for the Action class.

void DisplayAddress_BeforeCaptionShow(object sender, 
    Microsoft.Office.Tools.Excel.ActionEventArgs e)
{
    DisplayAddress.Caption = "Display the address of " + 
        e.Text;
}

Show: