Tools Reference (Visual Studio Tools for Office)
SmartTagBase.Caption Property

Gets the name of the smart tag.

Namespace: Microsoft.Office.Tools
Assembly: Microsoft.Office.Tools.Common (in microsoft.office.tools.common.dll)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Caption As String
Visual Basic (Usage)
Dim instance As SmartTagBase
Dim value As String

value = instance.Caption
C#
public string Caption { get; }

Property Value

The name of the smart tag.
Remarks

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

Example

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 the Microsoft.Office.Tools.Excel.SmartTag class.

Visual Basic
' This action displays smart tag details.
Private Sub Action2_Click(ByVal sender As Object, _
    ByVal e As ActionEventArgs) Handles Action2.Click

    MsgBox("The current smart tag caption is '" & _
        Me.Caption & "'. The current smart tag type is '" & _
        Me.SmartTagType & "'.")
End Sub
C#
// This action displays smart tag details.
private void Action2_Click(object sender, ActionEventArgs e)
{
    MessageBox.Show("The current smart tag caption is '" + 
        this.Caption + "'. The current smart tag type is '" + 
        this.SmartTagType + "'.");
}
See Also

Page view tracker