Action.Click 事件

在智能标记菜单中的操作被单击时发生。 此类型或成员只适合在 2007 Microsoft Office system 项目中使用。Office 2010 中已弃用智能标记。
.

命名空间:  Microsoft.Office.Tools.Word
程序集:  Microsoft.Office.Tools.Word(在 Microsoft.Office.Tools.Word.dll 中)

语法

声明
Event Click As ActionClickEventHandler
event ActionClickEventHandler Click

示例

下面的代码示例演示 Click 事件的处理程序。 该事件处理程序显示所识别的智能标记术语的起始位置和结束位置。 此代码示例摘自为 Action 提供的一个更大的示例。

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

.NET Framework 安全性

请参见

参考

Action 接口

Microsoft.Office.Tools.Word 命名空间