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

You don't really need a macro for that - it can be done with a wildcard Find/Replace. An equivalent macro is:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument.Range.Find
  .ClearFormatting
  .Forward = True
  .Format = True
  .Font.Size = 20
  .Wrap = wdFindContinue
  .MatchWildcards = True
  .Text = "<[A-Za-z]@>"
  With .Replacement
    .ClearFormatting
    .Text = "(^&)"
    .Font.ColorIndex = wdRed
  End With
  .Execute Replace:=wdReplaceAll
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote