NamedRange.SmartTags Property (2003 System)

Gets a SmartTags object that represents the identifier for the NamedRange control.

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property SmartTags As SmartTags
'Usage
Dim instance As NamedRange
Dim value As SmartTags

value = instance.SmartTags
[BrowsableAttribute(false)]
public SmartTags SmartTags { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.SmartTags
A SmartTags object that represents the identifier for the NamedRange control.

Examples

The following code example adds a stock ticker symbol smart tag to a NamedRange control.

Private Sub CreateSmartTag()
    Globals.ThisWorkbook.Application.SmartTagRecognizers.Recognize = True

    Dim namedRange1 As Microsoft.Office.Tools.Excel.NamedRange = _
        Me.Controls.AddNamedRange(Me.Range("C1"), "namedRange1")
    namedRange1.Formula = "MSFT"

    Dim SmartTag1 As Excel.SmartTag = _
        namedRange1.SmartTags.Add( _
        "urn:schemas-microsoft-com:smarttags#StockTickerSymbol")
End Sub

     private void CreateSmartTag()
        {
            Globals.ThisWorkbook.Application.SmartTagRecognizers.Recognize = true;

            Microsoft.Office.Tools.Excel.NamedRange namedRange1 =
                this.Controls.AddNamedRange(this.Range["C1", missing],
                "namedRange1");
            namedRange1.Formula = "MSFT";

            Excel.SmartTag SmartTag1 =
                namedRange1.SmartTags.Add(
                "urn:schemas-microsoft-com:smarttags#StockTickerSymbol");
        }

Permissions

See Also

Reference

NamedRange Class

NamedRange Members

Microsoft.Office.Tools.Excel Namespace