FriendlyName Property

Microsoft Word Visual Basic

FriendlyName Property

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

expression.FriendlyName

expression    Required. An expression that returns one of the objects in the Applies To list.

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.

    urn:schemas-microsoft-com:office:smarttags#address
  

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

    address
  

Example

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

    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