SmartTag![]() ![]() ![]() |
SmartTagAction 对象的集合,该集合代表用智能标记可执行的操作。
可用 SmartTag 对象的 SmartTagActions 属性返回 SmartTagActions 集合。
本示例为股票行情自动收录器符号“MSFT”插入一个可刷新的股票报盘,假定主机系统已连至 Internet。
Sub ExecuteASmartTag()
Dim strAction As String
strAction = "Insert refreshable stock price"
' Enable smart tags to be embedded and recognized.
ActiveWorkbook.SmartTagOptions.EmbedSmartTags = True
Application.SmartTagRecognizers.Recognize = True
' Invoke a smart tag for the Microsoft ticker symbol.
With Range("A1")
.Formula = "MSFT"
.SmartTags( _
"urn:schemas-microsoft-com:office:smarttags#stockticker") _
.SmartTagActions(strAction).Execute
End With
End Sub