Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

NamedRange.SmartTags Property (2007 System)

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

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

[BrowsableAttribute(false)]
public SmartTags SmartTags { get; }

Property Value

Type: SmartTags
A SmartTags object that represents the identifier for the NamedRange control.

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

This example is for a document-level customization.

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");
}

Community Additions

ADD
Show:
© 2015 Microsoft