View Single Post
  #12   Report Post  
Posted to microsoft.public.word.newusers
Anthony Giorgianni Anthony Giorgianni is offline
external usenet poster
 
Posts: 6
Default oops - Macro for highlighting

Oooops .... make that

Sub Highlight red()

Options.DefaultHighlightColorIndex = wdRed
SendKeys "{F10}"
End Sub

This turns on highlighting to highlight unselected text or highlights
selected text.

Thanks again.

Regards,
Anthony Giorgianni

For everyone's benefit, please reply to the group.
"Anthony Giorgianni" wrote in message
...
Thanks Tony.

I found the problem. On my old laptop, I must have assigned F5 to turn on
hgihlighting. So when I transferred the macro to my new laptop with
"Sendkey" F5, it didn't trigger the highlighter but instead ran Find and
replace, the assignment for f5 on that machine :O)

Now it works fine with:

Sub HighLight_Red()
Selection.Range.HighlightColorIndex = wdRed
SendKeys "(F10)"

With F10 now assigned to turn on highlighting.

End Sub

Thanks again to you and Lene.

Regards,
Anthony Giorgianni

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