SmartTagActions 属性

       

返回一个 SmartTagActions 对象,该对象代表选定的智能标记的操作类型。

expression.SmartTagActions

expression   必需。该表达式返回“应用于”列表中的对象之一。

说明

不能识别的智能标记操作项将返回一个运行错误。

示例

在本示例中,Microsoft Excel 将一个标题为“MSFT”的智能标记放置在单元格 A1 中,并将与该智能标记相关的智能标记操作通知用户。本示例假定主机系统与 Internet 相连。

Sub UseSmartTagActions()

    Dim strLink As String

    strLink = "urn:schemas-microsoft-com:smarttags#StockTickerSymbol"

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

    Range("A1").Formula = "MSFT"
    MsgBox Range("A1").SmartTags.Add(strLink).SmartTagActions.Item("stockview")

End Sub