返回一个 SmartTags 对象,该对象代表指定单元格的标识符。
expression.SmartTags
expression 必需。该表达式返回“应用于”列表中的对象之一。
本示例将一个名为“MSFT”的智能标记放置在单元格 A1 中,然后将单元格 A1 的标识符的父标识符通知给用户。本示例假定主机系统与 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