View Single Post
 
Old 08-28-2018, 09:18 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,465
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 I said, you can do it via Find/Replace. You could even record a macro for that!

Nevertheless, insert:
Code:
  With .Range.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .MatchWildcards = True
    .Forward = True
    .Format = False
    .Wrap = wdFindContinue
    .Text = "(PV: )RR([0-9])"
    .Replacement.Text = "\1\2"
    .Execute wdReplaceAll
    .Text = "(PV:)RR([0-9])"
    .Replacement.Text = "\1 \2"
    .Execute wdReplaceAll
  End With
before the final 'End With' in the code you're already using.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote