View Single Post
  #4   Report Post  
Posted to microsoft.public.word.newusers
Tony Jollans Tony Jollans is offline
external usenet poster
 
Posts: 1,308
Default Macro for highlighting

The Macro recorder, unfortunately, is not perfect. All that does is set the
default highlight colour; to apply it to the selection you need:

Selection.Range.HighlightColorIndex = wdGreen

You don't actually need to set the default colour; the above line is all you
need and it will highlight the selcted text in the given colour (green in
this example).

I don't understand the Find and Replace bit, sorry.

--
Enjoy,
Tony

"Anthony Giorgianni" wrote in message
...
Yes, Tony

Here is what the recorder did when I tried to set it up.

Sub Green()
'
' Green Macro
' Macro recorded 1/31/2007 by
'
Options.DefaultHighlightColorIndex = wdBrightGreen
End Sub

It doesn't work to activate green highlighting; nor does it turn selected
text green.
here is one that definitely ran on office 2000 that doesn't work on Word
2003. It actually brings up "find and replace," oddly, as do all my other
old highlighter macros!

Sub Red()
'
' Red Macro
' Macro recorded 01/06/2004 by Anthony Giorgianni
'
Options.DefaultHighlightColorIndex = wdRed
SendKeys "{F5}"
End Sub

Regards,
Anthony Giorgianni

For everyone's benefit, please reply to the group.
"Tony Jollans" My forename at my surname dot com wrote in message
...
Can you post an example of a macro that doesn't work?

--
Enjoy,
Tony

"Anthony Giorgianni" wrote in message
...
Hello Everyone

In my old version (2000?) of work I was able to set up macros to turn on
highlighting of different colors- having toolbar macros called "Green"
"yellow" "red"etc.

But I can't seem to do it in word 2003. I've tried importing my old
macros and rerecroding as well. It just won't turn on the highlighting.
Any ideas?

Thanks.

Regards,

Anthony Giorgianni
For everyone's benefit, please reply to the group.