ToggleCharacterCode Method

Microsoft Word Visual Basic

ToggleCharacterCode Method

       

Switches a selection between a Unicode character and its corresponding hexadecimal value.

expression.ToggleCharacterCode

expression   Required. An expression that returns a Selection object.

Example

This example enters the hex value "20ac" at the cursor position and toggles that value to its corresponding Unicode character.

Sub ToggleCharCase()
    Selection.TypeText Text:="20ac"
    Selection.ToggleCharacterCode
End Sub