A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Word » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Macro for highlighting



 
 
Thread Tools Display Modes
  #1  
Old January 31st, 2007, 10:44 PM posted to microsoft.public.word.newusers
Anthony Giorgianni
external usenet poster
 
Posts: 8
Default 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  
Old February 1st, 2007, 10:44 AM posted to microsoft.public.word.newusers
Tony Jollans
external usenet poster
 
Posts: 1,297
Default 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  
Old February 1st, 2007, 06:27 PM posted to microsoft.public.word.newusers
Anthony Giorgianni
external usenet poster
 
Posts: 8
Default 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  
Old February 1st, 2007, 06:41 PM posted to microsoft.public.word.newusers
Tony Jollans
external usenet poster
 
Posts: 1,297
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.







  #5  
Old February 1st, 2007, 10:31 PM posted to microsoft.public.word.newusers
Lene Fredborg
external usenet poster
 
Posts: 1,294
Default 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  
Old February 1st, 2007, 10:38 PM posted to microsoft.public.word.newusers
Lene Fredborg
external usenet poster
 
Posts: 1,294
Default 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  
Old February 1st, 2007, 11:25 PM posted to microsoft.public.word.newusers
Tony Jollans
external usenet poster
 
Posts: 1,297
Default 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  
Old February 1st, 2007, 11:50 PM posted to microsoft.public.word.newusers
Lene Fredborg
external usenet poster
 
Posts: 1,294
Default 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  
Old February 2nd, 2007, 01:40 AM posted to microsoft.public.word.newusers
Anthony Giorgianni
external usenet poster
 
Posts: 8
Default 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  
Old February 2nd, 2007, 01:50 AM posted to microsoft.public.word.newusers
Tony Jollans
external usenet poster
 
Posts: 1,297
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:59 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.