View Single Post
 
Old 04-19-2016, 04:20 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
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

For a bulk Find/Replace that uses an Excel workbook as the data source, see: https://www.msofficeforums.com/word/...html#post34254
With that code, you could simply delete the line:
xlRList = xlRList & "|" & Trim(.Range("B" & i))
and replace:
Code:
        For i = 1 To UBound(Split(xlFList, "|"))
          .Text = Split(xlFList, "|")(i)
          .Replacement.Text = Split(xlRList, "|")(i)
          .Execute Replace:=wdReplaceAll
        Next
with:
Code:
        .Format = True
        .Replacement.Highlight = True
        .Replacement.Text = "^&"
        For i = 1 To UBound(Split(xlFList, "|"))
          .Text = Split(xlFList, "|")(i)
          .Execute Replace:=wdReplaceAll
        Next
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote