Macro to highlight a selected text in word 2007

Posted on 2011-09-14
Medium Priority
Last Modified: 2012-08-13
How to have a macro which runs as soon as I select a text in word to highlight it.

Question by:RIAS
LVL 70

Expert Comment

ID: 36536267
What are you trying to do - what's wrong the the highlighter tool ?

Author Comment

ID: 36536282
thanks for the reply.
For using the highlighter tool ,I need to select a text and then highlight it.
Macro will be faster as soon as I select the text it will highlighted.

LVL 19

Accepted Solution

dlc110161 earned 2000 total points
ID: 36537369
Macro's need events to trigger them. I think you will have terrible results if you try to tie something to the OnClick event. Most macros are setup so that they run when someone presses a key combination or clicks a button.

So, for your needs, I would suggest that you figure out the keystrokes for enabling the highlighter tool and then use that to highlight. That way you will eliminate your need for clicking the mouse. In Word 2007, I believe that ALT, H, I will highlight for you.

Dawn Bleuel
Word MVP

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In this article, I will demonstrate that how to do a PST migration from Exchange Server to Office 365. This method allows importing one single PST, or multiple PST's at once.
Manually copying shapes and their assigned macros one by one to a new location can be tedious, but if you use the Excel utility workbook attached to this article, the process will be much quicker and easier.
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question