Share via


SmartTagType.FriendlyName Property

Word Developer Reference

Returns a String that represents a display name for a smart tag type.

Syntax

expression.FriendlyName

expression   A variable that represents a SmartTagType object.

Remarks

Smart tag type names, as defined in the Name property, are formatted as Uniform Resource Names (URNs). The friendly name removes the URN and leaves the name after the pound (#) sign. For example, the Address smart tag type returns the following URN for the Name property.

Visual Basic for Applications
  urn:schemas-microsoft-com:office:smarttags#address

The FriendlyName property removes everything up to and including the pound (#) sign and leaves the following String:

Visual Basic for Applications
  address

Example

The following example reloads the smart tag recognizers and action handlers for the Address smart tag type.

Visual Basic for Applications
  Sub ReloadAddressActionsRecognizersUsingFriendlyName()
    Dim objSmartTagType As SmartTagType
    Dim strSmartTagType As String
    
    For Each objSmartTagType In Application.SmartTagTypes
        If objSmartTagType.FriendlyName = "Address" Then
        With objSmartTagType
            .SmartTagActions.ReloadActions
            .SmartTagRecognizers.ReloadRecognizers
        End With
        
        Exit For
    End If
Next

End Sub

See Also