Solved

Macro to highlight a selected text in word 2007

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

Cheers
0
Comment
Question by:RIAS
3 Comments
 
LVL 70

Expert Comment

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

Author Comment

by:RIAS
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.

Cheers
0
 
LVL 19

Accepted Solution

by:
dlc110161 earned 500 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
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

823 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