![]() |
|
#1
|
|||
|
|||
|
Hi,
I use the following code to highlight a selected word, or line or paragraph. However, when I select two or more non-contiguous words (by keeping the CTRL key pressed), and apply this macro, it only highlights the last selected word. What can I do to get the macro to highlight all of selected words? Code:
Selection.Expand Unit:=wdWord Selection.Range.HighlightColorIndex = wdYellow Selection.MoveRight Unit:=wdCharacter, Count:=1 |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Novice needs: Complicated running totals adding substracting non contiguous cells contiguous columns
|
innkeeper9 | Excel | 5 | 08-30-2016 04:43 PM |
| Contiguous grouping | derohanes | Excel | 4 | 10-30-2015 04:41 PM |
How to make it highlight blocks of text (words) without highlighting extra space @end
|
seortm | Word | 3 | 03-30-2015 08:12 AM |
| Highlighting multiple word instances in text | gekser | Word VBA | 9 | 07-10-2014 05:46 AM |
Macro for highlighting specific number of words
|
icsjohn | Word VBA | 2 | 12-07-2011 06:44 PM |