macro to bold, in green, times new roman font size14 all text betweenbraces"["

J

jbesr1230

Hello,
I would like a macro the would make all text between braces "[ text ]"
green, bold and in times new roman font size 14. All, if possible the
macro would remove the braces when done.

Thank-you.

JB
 
G

Graham Mayor

Sub ReplaceExample()
With Selection
.HomeKey unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
'**********************
.Text = "\[(*)\]"
.Replacement.Text = "\1"
.Replacement.Font.name = "Times New Roman"
.Replacement.Font.Color = wdColorGreen
.Replacement.Font.Bold = True
'**********************
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
End With
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top