SmartTagAction Object [Excel 2003 VBA Language Reference]

SmartTag
SmartTagActions
SmartTagAction

Represents the actions that can be performed with smart tags.

Using the SmartTagAction object

Use the Item property of the SmartTagActions collection to return a SmartTagAction object.

Once a SmartTagAction object has been returned, you can activate a smart tag to automatically annotate data using the Execute method. This example inserts a refreshable stock quote for the ticker symbol "MSFT" and it assumes the host system is connected to the 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

Properties | ActiveXControl Property | Application Property | CheckboxState Property | Creator Property | ExpandHelp Property | ListSelection Property | Name Property | Parent Property | PresentInPane Property | RadioGroupSelection Property | TextboxText Property | Type Property

Methods | Execute Method

Parent Objects | SmartTag

Child Objects

See Also | SmartTag Object | SmartTagOptions Object | SmartTagRecognizer Object