ActionEventArgs.Text Property (2007 System)
Gets the text that was recognized as a smart tag.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
Public ReadOnly Property Text As String
'Usage
Dim instance As ActionEventArgs
Dim value As String
value = instance.Text
public string Text { get; }
public:
property String^ Text {
String^ get ();
}
public function get Text () : String
Property Value
Type: System.String
The text that was recognized as a smart tag.
Examples
The following code example demonstrates a handler for the BeforeCaptionShow event. The event handler uses the Text property to modify the menu caption of the action. This code example is part of a larger example provided for the Action class.
This example is for a document-level customization.
Private Sub DisplayAddress_BeforeCaptionShow(ByVal sender As Object, _
ByVal e As Microsoft.Office.Tools.Excel.ActionEventArgs) _
Handles DisplayAddress.BeforeCaptionShow
Dim clickedAction As Microsoft.Office.Tools.Excel.Action = _
TryCast(sender, Microsoft.Office.Tools.Excel.Action)
If clickedAction IsNot Nothing Then
clickedAction.Caption = "Display the address of " & e.Text
End If
End Sub
void DisplayAddress_BeforeCaptionShow(object sender,
Microsoft.Office.Tools.Excel.ActionEventArgs e)
{
Microsoft.Office.Tools.Excel.Action clickedAction =
sender as Microsoft.Office.Tools.Excel.Action;
if (clickedAction != null)
{
clickedAction.Caption = "Display the address of " +
e.Text;
}
}
.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.