ActionEventArgs.Range Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the range containing the text that has been recognized as a 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 Microsoft::Office::Interop::Excel::Range ^ Range { Microsoft::Office::Interop::Excel::Range ^ get(); };
public Microsoft.Office.Interop.Excel.Range Range { get; }
member this.Range : Microsoft.Office.Interop.Excel.Range
Public ReadOnly Property Range As Range
Property Value
The range containing the text that has been recognized as a smart tag.
Examples
The following code example demonstrates a handler for the Click event. The event handler uses the Range property to display the address of the cell that contains the recognized smart tag term. This code example is part of a larger example provided for the Action interface.
This example is for a document-level customization.
void DisplayAddress_Click(object sender,
Microsoft.Office.Tools.Excel.ActionEventArgs e)
{
string smartTagAddress = e.Range.get_Address(Excel.XlReferenceStyle.xlA1);
System.Windows.Forms.MessageBox.Show("The recognized text '" + e.Text +
"' is at range " + smartTagAddress);
}
Private Sub DisplayAddress_Click(ByVal sender As Object, _
ByVal e As Microsoft.Office.Tools.Excel.ActionEventArgs) _
Handles DisplayAddress.Click
Dim smartTagAddress As String = e.Range.Address( _
ReferenceStyle:=Excel.XlReferenceStyle.xlA1)
MsgBox("The recognized text '" & e.Text & _
"' is at range " & smartTagAddress)
End Sub