SmartTags Property

Microsoft Excel Visual Basic

object representing the identifier for the specified cell.

expression.SmartTags

expression    Required. An expression that returns one of the objects in the Applies To list.

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.

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").SmartTags.Parent

End Sub