void DisplayAddress_Click(object sender, Microsoft.Office.Tools.Excel.ActionEventArgs e) { string smartTagAddress = e.Range.get_Address(Excel.XlReferenceStyle.xlA1); System.Windows.Forms.MessageBox.Show("The recognized text '" + e.Text + "' is at range " + smartTagAddress); }
void DisplayAddress_BeforeCaptionShow(object sender, Microsoft.Office.Tools.Excel.ActionEventArgs e) { Microsoft.Office.Tools.Excel.Action clickedAction = sender as Microsoft.Office.Tools.Excel.Action; if (clickedAction != null) { clickedAction.Caption = "Display the address of " + e.Text; } }