If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Macro for highlighting
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. |
#2
|
|||
|
|||
Macro for highlighting
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. |
#3
|
|||
|
|||
Macro for highlighting
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. |
#4
|
|||
|
|||
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. |
#5
|
|||
|
|||
Macro for highlighting
The following macro will change the highlight color of the selection to red -
it does not change the color selected in the Highlight icon in the Formatting toolbar: Sub HighLight_Red() Selection.Range.HighlightColorIndex = wdRed End Sub If you want to change the color selected in the Highlight icon too, add the following code line to the macro: Options.DefaultHighlightColorIndex = wdRed Replace wdRed by the desired WdColorIndex. -- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "Anthony Giorgianni" wrote: 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. |
#6
|
|||
|
|||
Macro for highlighting
I somehow failed to notice that the answer in my post above was already given
by Tony Jollans. Sorry. -- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "Lene Fredborg" wrote: The following macro will change the highlight color of the selection to red - it does not change the color selected in the Highlight icon in the Formatting toolbar: Sub HighLight_Red() Selection.Range.HighlightColorIndex = wdRed End Sub If you want to change the color selected in the Highlight icon too, add the following code line to the macro: Options.DefaultHighlightColorIndex = wdRed Replace wdRed by the desired WdColorIndex. -- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "Anthony Giorgianni" wrote: 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. |
#7
|
|||
|
|||
Macro for highlighting
No need to apologise, Lene. At least we both gave the same answer :-)
-- Enjoy, Tony "Lene Fredborg" wrote in message ... I somehow failed to notice that the answer in my post above was already given by Tony Jollans. Sorry. -- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "Lene Fredborg" wrote: The following macro will change the highlight color of the selection to red - it does not change the color selected in the Highlight icon in the Formatting toolbar: Sub HighLight_Red() Selection.Range.HighlightColorIndex = wdRed End Sub If you want to change the color selected in the Highlight icon too, add the following code line to the macro: Options.DefaultHighlightColorIndex = wdRed Replace wdRed by the desired WdColorIndex. -- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "Anthony Giorgianni" wrote: 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. |
#8
|
|||
|
|||
Macro for highlighting
Thanks, Tony. Anyway, two similar answers are better than none ;-)
-- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "Tony Jollans" wrote: No need to apologise, Lene. At least we both gave the same answer :-) -- Enjoy, Tony "Lene Fredborg" wrote in message ... I somehow failed to notice that the answer in my post above was already given by Tony Jollans. Sorry. -- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "Lene Fredborg" wrote: The following macro will change the highlight color of the selection to red - it does not change the color selected in the Highlight icon in the Formatting toolbar: Sub HighLight_Red() Selection.Range.HighlightColorIndex = wdRed End Sub If you want to change the color selected in the Highlight icon too, add the following code line to the macro: Options.DefaultHighlightColorIndex = wdRed Replace wdRed by the desired WdColorIndex. -- Regards Lene Fredborg DocTools - Denmark www.thedoctools.com Document automation - add-ins, macros and templates for Microsoft Word "Anthony Giorgianni" wrote: 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. |
#9
|
|||
|
|||
Macro for highlighting
Thank you both. Works well. Now to finish it, how do I just turn on
highlighting tool with the appropriate color so that I can go highlighting things without selecting them first? Regards, Anthony Giorgianni For everyone's benefit, please reply to the group. "Tony Jollans" My forename at my surname dot com wrote in message ... 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. |
#10
|
|||
|
|||
Macro for highlighting
Not sure about not selecting them first but the recorded code you posted
should change the default on the toolbar button -- Enjoy, Tony "Anthony Giorgianni" wrote in message ... Thank you both. Works well. Now to finish it, how do I just turn on highlighting tool with the appropriate color so that I can go highlighting things without selecting them first? Regards, Anthony Giorgianni For everyone's benefit, please reply to the group. "Tony Jollans" My forename at my surname dot com wrote in message ... 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. |
Thread Tools | |
Display Modes | |
|
|