Share via


Application.SmartTagTypes Property

Word Developer Reference

Returns a SmartTagTypes collection that represents the smart tag types for the smart tag components installed in Microsoft Word.

Syntax

expression.SmartTagTypes

expression   An expression that returns an Application object.

Remarks

A smart tag type is a single item in a smart tag component. Smart tag components can contain multiple smart tag types. For example, the Address (English) smart tag list installed on English systems by default contains a name smart tag type, a street smart tag type, and a city smart tag type, to name just a few. The SmartTagTypes collection contains all smart tag types for all components installed on a user's computer.

Example

The following example loops through the SmartTagTypes collection. If the SmartTagType is the Address smart tag, then it reloads the recognizers and handlers for that smart tag.

Visual Basic for Applications
  Sub GetSmartTagsTypes()
    Dim objSmartTagType As SmartTagType
    Dim strSmartTagType As String
    
    strSmartTagType = "urn:schemas-microsoft-com" & _
        ":office:smarttags#address"
    
    For Each objSmartTagType In Application.SmartTagTypes
        If objSmartTagType = strSmartTagType Then
            With objSmartTagType
                .SmartTagActions.ReloadActions
                .SmartTagRecognizers.ReloadRecognizers
             End With
        End If
    Next
End Sub

See Also