View Single Post
 
Old 05-14-2016, 11:38 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Or, to update just the 2nd instance:
Code:
Sub Demo()
Dim arrFnd, arrRep, i As Long, j As Long
arrFnd = Array("Air Boat", "Power Boat", "Ferry")
arrRep = Array("AB123", "PB456", "F123")
For i = 0 To UBound(arrFnd)
  j = 0
  With ActiveDocument.Range
    With .Find
      .Text = arrFnd(i)
      .MatchWholeWord = True
      .Wrap = wdFindStop
      .Execute
    End With
    Do While .Find.Found
      j = j + 1
      If j = 2 Then
        .InsertAfter arrRep(i)
        Exit Do
      End If
      .Collapse wdCollapseEnd
      .Find.Execute
    Loop
  End With
Next i
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote