Suzanne S. Barnhill said:
This sort of swapping function is obviously much desired.
I remember that one of the first Word "tricks" books I ever
acquired had a WordBasic macro to do just this. It's really
sort of a show-off technique that for most users is not that
useful: selecting two reversed characters and running a
macro, even using a keyboard shortcut, requires about as
much keyboarding as selecting the characters and retyping
them correctly. AutoCorrect entries to deal with your most
common errors, however, do make sense.
If you want a macro anyway, see below.
It works if you first:
-- select both characters to swap,
-- select the first character,
-- or put the cursor between the characters to swap...
and then run the macro.
Else, it gives an error message and does nothing.
For help with macros, how to put them on keyboard shortcuts, and so on:
http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm
Regards,
Klaus
Sub Swap()
Select Case (Selection.End - Selection.Start)
Case 0
MsgBox "0"
Selection.MoveStart _
Unit:=wdCharacter, _
Count:=-1
Selection.Characters(1).Cut
Selection.Move Unit:=wdCharacter, _
Count:=1
Selection.Paste
Case 1, 2
MsgBox "1, 2"
Selection.Characters(1).Cut
Selection.Move Unit:=wdCharacter, _
Count:=1
Selection.Paste
Case Else
MsgBox "Which characters?", _
vbCritical, "macro Swap"
End Select
End Sub