Action.Click Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the action in the smart tag menu is clicked. This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010..
public:
event Microsoft::Office::Tools::Word::ActionClickEventHandler ^ Click;
event Microsoft.Office.Tools.Word.ActionClickEventHandler Click;
member this.Click : Microsoft.Office.Tools.Word.ActionClickEventHandler
Event Click As ActionClickEventHandler
Event Type
Examples
The following code example demonstrates a handler for the Click event. The event handler displays the start and end position of the recognized smart tag term. This code example is part of a larger example provided for Action.
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());
}
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