Share via


SmartTagActions Object

Excel Developer Reference

A collection of SmartTagAction objects that represent the actions that can be performed with smart tags.

Remarks

Use the SmartTagActions property of the SmartTag object to return a SmartTagActions collection.

Example

This example inserts a refreshable stock quote for the ticker symbol "MSFT" and it assumes the host system is connected to the Internet.

Visual Basic for Applications
  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

See Also