![]() |
|
|
|
#1
|
|||
|
|||
|
Hi
I want to remove the highlight from all text highlighted in yellow but not from text highlighted in any other colour. Could anyone tell me how to do this as a 'Replace All' function? Thanks. Last edited by Charles Kenyon; 04-15-2016 at 02:36 PM. Reason: Mark as solved |
|
#2
|
||||
|
||||
|
How about
Code:
Sub Macro1()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Highlight = True
Do While .Execute
If oRng.HighlightColorIndex = wdYellow Then
oRng.HighlightColorIndex = wdAuto
End If
oRng.Collapse 0
Loop
End With
lbl_Exit:
Set oRng = Nothing
Exit Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#3
|
|||
|
|||
|
Much appreciated!
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
I need to convert shaded text into highlighted text on about 80 different long documents. VBA macro?
|
AustinBrister | Word VBA | 8 | 05-28-2015 02:42 PM |
| Quickly select lines of certain colour | RFoudy | PowerPoint | 27 | 09-09-2014 12:35 AM |
Formatting- Apply changes to highlighted text results in same change to other text
|
sential | Word | 6 | 01-10-2014 03:22 PM |
Quickest way to change text to Arial size 11 specific colour
|
BlueClearSky | Word | 6 | 11-22-2013 03:34 PM |
How to filter sentences wth highlighted colour
|
rajpes | Word | 4 | 02-25-2011 12:43 AM |