Compartir a través de


SmartTags.SmartTagsByType Method

Word Developer Reference

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

Syntax

expression.SmartTagsByType(Name)

expression   Required. A variable that represents a SmartTags collection.

Parameters

Name Required/Optional Data Type Description
Name Required String The name of the smart tag type.

Return Value
SmartTags

Example

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

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