Admittingly simplistic and perhaps crude, but this might get you what you need:
Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim strCode As String
Selection.ToggleCharacterCode
strCode = Selection.Text
Selection.ToggleCharacterCode
MsgBox strCode
End Sub