WOW!!! Thanks, Graham. The macro works.
Now for the $64 question.... how do I not make the number
10 11 15 17 etc. turn red or partially red?
My list goes from 1-36
1-3-5-7-9-12-14-16-18-19-21-23-25-27-30-32-34-36
need to be red but the rest stay the default black.
Also it won't find anything to change if the Use wildcards checkbox
is not checked!
If you prefer, the following macro will do the same job:
Sub OneThreeFive_to_red()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[135]{1}"
.Replacement.Text = "^&"
.Replacement.Font.Color = wdColorRed
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute replace:=wdReplaceAll
End Sub
see
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Suzanne S. Barnhill wrote:
It works here. Make sure that the insertion point is in the
"Replace with" box when you format the font color as red. The bug
that bites me every time is that, even though you have the
insertion point there when you click More, it jumps back to "Find
what," and you end up applying the font formatting to "Find what"
instead.
In the find box put
[135]{1}
in the replace box put
^&
Click the 'More' button
With your cursor in the replace box
Format > font > and check the colour as red
Check the 'Use wildcards' box
I did it all as you laid it out. Nothing gets changed.
See
http://www.gmayor.com/replace_using_wildcards.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
G-Artist wrote:
You can use Find and Replace to change the font color. Using
wildcards, you can do more than one number at a time.
Thanks for the reply. Could you be a bit more specific as to
how that is done? I don't seem to see a color option among
the ones shown.
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Email cannot be acknowledged; please post all follow-ups to
the newsgroup so all may benefit.
Hi,
I have many lists of numbers typed into a Word 2000 document.
Each specific number needs to be one of 3 colors (Red, Black
or Green). So, what I what I would like to do is find a way
to use something like a "search and replace" to alter some of
the current numbers, which are all Black, and change them to
either Red or Green depending on the specific number.
Very, very tedious to do them by hand.
E.g. 1 2 3 4 5 6 - the 1, 3, 5 need to be red.
Doable? How?
Thanks.