SmartTagBase.Caption 属性

获取智能标记的名称。

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

语法

声明
ReadOnly Property Caption As String
    Get
string Caption { get; }

属性值

类型:System.String
智能标记的名称。

备注

智能标记的名称显示在智能标记菜单的顶部。

示例

下面的代码示例演示 Action.Click 事件的处理程序。 该事件处理程序使用 Caption 属性显示智能标记的名称。 此代码示例摘自为 Microsoft.Office.Tools.Excel.SmartTag 提供的一个更大的示例。

' This action displays smart tag details.
Private Sub Action2_Click(ByVal sender As Object,
    ByVal e As Microsoft.Office.Tools.Excel.ActionEventArgs) Handles Action2.Click
    MessageBox.Show("The current smart tag caption is '" &
    smartTagDemo.Caption & "'. The current smart tag type is '" &
    smartTagDemo.SmartTagType & "'.")
End Sub
// This action displays smart tag details.
private void Action2_Click(object sender,
    Microsoft.Office.Tools.Excel.ActionEventArgs e)
{
    MessageBox.Show("The current smart tag caption is '" +
        smartTagDemo.Caption + "'. The current smart tag type is '" +
        smartTagDemo.SmartTagType + "'.");
}

.NET Framework 安全性

请参见

参考

SmartTagBase 接口

Microsoft.Office.Tools 命名空间