SmartTagBase.Caption Property (2007 System)
Gets the name of the smart tag.
Namespace: Microsoft.Office.Tools
Assembly: Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)
Syntax
'Declaration
Public ReadOnly Property Caption As String
'Usage
Dim instance As SmartTagBase
Dim value As String
value = instance.Caption
public string Caption { get; }
public:
property String^ Caption {
String^ get ();
}
public function get Caption () : String
Property Value
Type: System.String
The name of the smart tag.
Remarks
The name of the smart tag is displayed at the top of the smart tag menu.
Examples
The following code example demonstrates a handler for the 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.
This example is for a document-level customization.
' 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
// 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 + "'.");
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.