I can't swear to it, but I don't think it could be done with the traditional
UI Find and Replace function (not in one pass that is). Word would want to
find all "left" and replace with "right" then all the words would be "right"
and Word would change them all to "left." You would need to Change all the
"left" to some unique sequence then change all the right to some differenct
unique sequece then change the first sequence to "right" and the second to
"left" You might use a macro like this:
Sub ScratchMacro()
Dim oRng As Word.Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "left"
.Replacement.Text = "*#*"
.Execute Replace:=wdReplaceAll
.Text = "right"
.Replacement.Text = "#*#"
.Execute Replace:=wdReplaceAll
.Text = "*#*"
.Replacement.Text = "right"
.Execute Replace:=wdReplaceAll
.Text = "#*#"
.Replacement.Text = "left"
.Execute Replace:=wdReplaceAll
End With
End Sub
Another way would be to process each word one at a time:
Sub ScratchMacroII()
Dim oWord As Range
Dim i As Long
Dim bUnTrim As Boolean
For i = 1 To ActiveDocument.Words.Count
If ActiveDocument.Words(i).Characters.Last = " " Then bUnTrim = True
Select Case Trim(ActiveDocument.Words(i))
Case Is = "right"
If bUnTrim Then
ActiveDocument.Words(i) = "left" & " "
Else
ActiveDocument.Words(i) = "left"
End If
Case Is = "Right"
If bUnTrim Then
ActiveDocument.Words(i) = "Left" & " "
Else
ActiveDocument.Words(i) = "Left"
End If
Case Is = "left"
If bUnTrim Then
ActiveDocument.Words(i) = "right" & " "
Else
ActiveDocument.Words(i) = "right"
End If
Case Is = "Left"
If bUnTrim Then
ActiveDocument.Words(i) = "Right" &
ActiveDocument.Words(i).Characters.Last
Else
ActiveDocument.Words(i) = "Right"
End If
End Select
bUnTrim = False
Next i
End Sub