View Single Post
 
Old 11-02-2018, 05:59 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,158
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You can tidy up the code a bit more. Note the differences with this version.
Code:
Sub FiRe()
  Dim FndList() As String, RepList() As String, i As Long
  Application.ScreenUpdating = False
  FndList = Split("257,275,299,333,363", ",")
  RepList = Split("A,E,I,O,U", ",")
  With ActiveDocument.Range.Find
    .Wrap = wdFindContinue
    For i = 0 To UBound(FndList)
      .Text = ChrW(FndList(i))
      .Replacement.Text = RepList(i)
      .Execute Replace:=wdReplaceAll
    Next
  End With
  Application.ScreenUpdating = True
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote