View Single Post
 
Old 04-06-2017, 04:28 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,381
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

There doesn't appear to be anything 'wrong' with your code, but I can't see any point to the loop, either - you could do the same with:
Code:
With ActiveDocument.Range.Find
  .ClearFormatting
  .Replacement.ClearFormatting
  .Text = "Trizol"
  .Replacement.Text = "TRIzolŪ"
  .Forward = True
  .Format = False
  .MatchCase = False
  .Wrap = wdFindContinue
  .MatchWholeWord = True
  .Execute Replace:=wdReplaceAll
End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote