共用方式為


SmartTagBase.Caption 屬性

取得智慧標籤的名稱。 這個型別或成員僅適用於 2007 Microsoft Office system 專案。智慧標籤在 Office 2010 中已被取代。
.

命名空間:  Microsoft.Office.Tools
組件:  Microsoft.Office.Tools.Common (在 Microsoft.Office.Tools.Common.dll 中)

語法

'宣告
ReadOnly Property Caption As String
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 命名空間