#1
|
|||
|
|||
Macro to highlight text between 2 points in word 2010
I am writing a document in word 2010 and need a macro which highlights from starting point 1 to ending point 2 ( the idea is to see the bottom bar for number of words in the highlighted part). I have made markers by typing xxx at point 1 and yyy at point 2. I am quite new to ms word macros. Can someone pl give me the code ? Tks a lot. |
#2
|
||||
|
||||
Why do you need a macro? A wildcard Find/Replace can do the same job, where:
Find = xxx(*)yyy Replace = \1 and the replacement attributes have the desired highlighting set. Note: the above even deletes the markers as part of the process. If you don't want that, change \1 to ^&.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Worked, thanks, brillianto ! I will be doing repeatedly, so I will use the ^& option. I need to do a Ctrl Home first, otherwise it does not Find. Also, when I change the Find/Replace options to do some other search I have to enter all the stuff all over again. So I just recorded a macro combining Ctrl Home and Find Replace ! And gave it a shortCut. Will save me hours as my document is miles long - a dissertation, sigh ! THANKS !
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to selectively highlight text in word | cnyoon2 | Word | 1 | 08-04-2015 08:16 AM |
Bullet points with text? | jjmclell | Word | 2 | 03-01-2013 11:42 AM |
Edit Points in Curve: MS Office changes points properties itself, without my action. | Sergey SPb | PowerPoint | 0 | 08-27-2012 05:33 AM |
Trying to highlight pasted text in a macro | goldengate | Word VBA | 0 | 09-14-2010 09:41 PM |
find - reading highlight - highlight all / highlight doesn't stick when saved | bobk544 | Word | 3 | 04-15-2009 03:31 PM |