The other recorded properties are also left out for simplicity - except for Selection.Find.Wrap = wdFindContinue which really is necessary. For a production macro, you might want to add them back in just to be on the safe side.
~~~~~~~~~~~~~~~~~~~~~~~~~
Sub ReplaceText()
Dim FindStringArray(1000) As String
Dim ReplaceStringArray(1000) As String
Dim i As Integer
Dim ArrayEnd As Integer
' Initialize the arrays
' with the find and replace strings
FindStringArray(0) = "find 0"
ReplaceStringArray(0) = "replace 0"
FindStringArray(1) = "find 1"
ReplaceStringArray(1) = "replace 1"
' The last element used in the arrays
ArrayEnd = 1
' Necessary to start at the beginning
' for each Find
Selection.Find.Wrap = wdFindContinue
For i = 0 To ArrayEnd
With Selection.Find
.Text = FindStringArray(i)
.Replacement.Text = ReplaceStringArray(i)
.Execute Replace:=wdReplaceAll
End With
Next 'i
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~
download the document and macro

