Thanks everyone for your help.
I think I'll simply to stick with using the sendkeys command. That's a neat
macro Lene but doesn't seem to do what I'm looking for. I think I'm probably
not explaining it right. All I want to be able to do is simply turn on
highlighting with a certain color with one click, avoiding having to go up
to the highlighting menu item, select the color and turn it on.
The reason is that, as a journalist, many times I'm reading a document and
want to highlight items for different importance - green = interesting but
not critical, yellow = pretty important, red = information that I must use.
So when I see something pretty important, I want to turn on yellow
highlighting with one click of a toolbar icon. Then I highlight that
(usually without selecting it first) Later I might see something that's
critical, so I want to turn on red highlighting with one click.
This does that exactly
Options.DefaultHighlightColorIndex = wdYellow REM: Selects the
highlighting color yellow
SendKeys "{F5}" REM Turns on highlighting, where Word has been set to
associate F5 with turning on highlighting.
Tony suggested that using sendkeys isn't the best way to do this. It
certainly doesn't make the macro portable if I want to transfer it to
another machine without having to set F5 (as I found out when I tried to
transfer it from my home to my work machine and forgot about setting F5 to
turn on highlighting.) So I was curious if there was another way to do it.
But it's no big deal. It works fine. By the way, to make it really easy, I
created a "highlighting" toolbar with icons that are simply colored squares,
each assigned to a different color macro and one assigned to "no color" for
clearing.
Thanks again.
Regards
Anthony Giorgianni
For everyone's benefit, please reply to the group.