Share via


Range.SmartTags Property

Excel Developer Reference

Returns a SmartTags object representing the identifier for the specified cell.

Syntax

expression.SmartTags

expression   A variable that represents a Range object.

Example

This example places a smart tag in cell A1 then notifies the user the parent of the identifier for cell A1, which is "MSFT". This example assumes the host system is connected to the Internet.

Visual Basic for Applications
  Sub ReturnSmartTag()
Dim strLink As String
Dim strType As String

' Define SmartTag variables.
strLink = "urn:schemas-microsoft-com:smarttags#StockTickerSymbol"
strType = "stockview"

' Enable smart tags to be embedded and recognized.
ActiveWorkbook.SmartTagOptions.EmbedSmartTags = True
Application.SmartTagRecognizers.Recognize = True

Range("A1").Formula = "MSFT"
MsgBox Range("A1").<strong>SmartTags</strong>.Parent

End Sub

See Also