Share via


SmartTagActions Collection

Word Developer Reference

Represents a collection of actions for an individual smart tag or a type of smart tag.

Remarks

Use the SmartTag object to access all actions related to a single smart tag in a document; use the SmartTagType object to access all actions related to a specific type of smart tag.

Smart tag actions are processes that are programmed into the smart tags; they allow users to perform certain functions related to the smart tag. For example, one action for a smart tag might be to access a Web site while another action inserts contact information into Microsoft Outlook while yet another displays a map and driving directions.

Use the SmartTagActions property to return all smart tag actions associated with a SmartTag object or a SmartTagType object. For example, the following code returns a collection of SmartTagAction objects associated with the Address smart tag, and then it uses the ReloadActions method to reload actions for each smart tag in the returned collection.

Visual Basic for Applications
  Sub GetSmartTagsByType()
    Dim objSmartTag As SmartTag
    Dim objSmartTags As SmartTags
    Dim strSmartTagName As String
    
    strSmartTagName = "urn:schemas-microsoft-com" & _
        ":office:smarttags#address"
    
    Set objSmartTags = ActiveDocument.SmartTags _
        .SmartTagsByType(strSmartTagName)
    
    For Each objSmartTag In objSmartTags
        objSmartTag.SmartTagActions.ReloadActions
    Next
End Sub

See Also