I'm sure there are more elegant ways, but the following seems to work if the names are all in a column i.e.
John Johnson
Patrick Something
Annie Bunny
Sub switchwords()
Dim ls As Integer
'change following number to number of names you want to change
ls = 1000
Selection.HomeKey unit:=wdStory
Do While ls > 0
Selection.MoveRight unit:=wdWord, Count:=1, Extend:=wdExtend
Selection.Cut
Selection.EndKey unit:=wdLine
Selection.TypeText Text:=" "
Selection.PasteAndFormat (wdPasteDefault)
Selection.MoveDown unit:=wdLine, Count:=1
Selection.HomeKey unit:=wdLine
ls = ls - 1
Loop
End Sub
Just make sure to change the ls variable to be not much more than the number of names you have.
Consider using Excel for this - would be much easier.
HTH
SIxhbbits
|