SmartTagsByType Method

Microsoft Word Visual Basic

SmartTagsByType Method

Returns a SmartTags collection that represents all the smart tags installed on a user's computer of the type specified in the Name parameter.

expression.SmartTagsByType(Name)

expression    Required. An expression that returns a SmartTags collection.

Name Required String. The name of the smart tag type.

Example

The following example reloads smart tag actions for all Address smart tags in the active document.

    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