Share via


SmartTagBase.Caption-Eigenschaft

Ruft den Namen des Smarttags ab.Dieser Typ oder Member ist nur für die Verwendung in Projekten für das Microsoft Office 2007-System vorgesehen. Smarttags sind in Office 2010 veraltet.
.

Namespace:  Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.Common (in Microsoft.Office.Tools.Common.dll)

Syntax

'Declaration
ReadOnly Property Caption As String
string Caption { get; }

Eigenschaftswert

Typ: System.String
Der Name des Smarttags.

Hinweise

Der Name des Smarttags, der oben im Smarttagmenü angezeigt wird.

Beispiele

Im folgenden Codebeispiel wird ein Handler für das Action.Click-Ereignis veranschaulicht.Der Ereignishandler verwendet die Caption-Eigenschaft, um den Namen des Smarttags anzuzeigen.Dieses Codebeispiel ist Teil eines umfangreicheren Beispiels zu 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-Sicherheit

Siehe auch

Referenz

SmartTagBase Schnittstelle

Microsoft.Office.Tools-Namespace