View Single Post
 
Old 02-24-2020, 09:40 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

As previously suggested, you might need to process singular & plural forms alike:
Code:
Sub BulkFindReplace()
Application.ScreenUpdating = False
Dim FList As String, RList As String, j As Long
FList = "School,Library,Technical,Mathematics,Physics,Chemistry,students,student,teachers,teacher"
RList = "Sch,lib,Tech,Maths,Phys,Chem,stdnts,stdnt,tchrs,tchr"
With ActiveDocument.Range.Find
  .ClearFormatting
  .Replacement.ClearFormatting
  .Format = False
  .Forward = True
  .MatchCase = False
  .MatchWholeWord = True
   'Process each word from the Find/Replace Lists
  For j = 0 To UBound(Split(FList, ","))
    .Text = Split(FList, ",")(j)
    .Replacement.Text = Split(RList, ",")(j)
    .Execute Replace:=wdReplaceAll
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote