Udostępnij za pośrednictwem


SmartTagBase.Caption Property

Definition

Gets the name of the smart tag. 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:
 property System::String ^ Caption { System::String ^ get(); };
public string Caption { get; }
member this.Caption : string
Public ReadOnly Property Caption As String

Property Value

The name of the smart tag.

Examples

The following code example demonstrates a handler for the Microsoft.Office.Tools.Excel.Action.Click event. The event handler uses the Caption property to display the name of the smart tag. This code example is part of a larger example provided for Microsoft.Office.Tools.Excel.SmartTag.

// 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 + "'.");
}
' 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

Remarks

The name of the smart tag is displayed at the top of the smart tag menu.

Applies to