NamedRange.SmartTags Property (2007 System)
Visual Studio 2008
Gets a SmartTags object that represents the identifier for the NamedRange control.
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
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"); }
- 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.