Share via


SmartTag.SmartTagActions Property

Excel Developer Reference

Returns a SmartTagActions object the type of action for a selected smart tag.

Syntax

expression.SmartTagActions

expression   A variable that represents a SmartTag object.

Remarks

An unrecognized smart tag action item will return a run-time error.

Example

This example, Microsoft Excel places a smart tag titled "MSFT" in cell A1 and then notifies the user the smart tag action related to that smart tag. This example assumes the host system is connected to the Internet.

Visual Basic for Applications
  Sub UseSmartTagActions()
    Dim strLink As String
strLink = "urn:schemas-microsoft-com:office:smarttags#stockticker"

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

Range("A1").Value = "MSFT"
MsgBox Range("A1").SmartTags.Add(strLink).<strong class="bterm">SmartTagActions</strong>.Item(1).Name

End Sub

See Also