Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2016, 02:33 AM
bertietheblue bertietheblue is offline How do I select all text highlighted in a specific colour? Windows 7 64bit How do I select all text highlighted in a specific colour? Office 2010 32bit
Advanced Beginner
How do I select all text highlighted in a specific colour?
 
Join Date: May 2012
Location: United Kingdom
Posts: 54
bertietheblue is on a distinguished road
Default How do I select all text highlighted in a specific colour?

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
Reply With Quote
  #2  
Old 04-15-2016, 06:58 AM
gmayor's Avatar
gmayor gmayor is offline How do I select all text highlighted in a specific colour? Windows 10 How do I select all text highlighted in a specific colour? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #3  
Old 04-15-2016, 12:30 PM
bertietheblue bertietheblue is offline How do I select all text highlighted in a specific colour? Windows 7 64bit How do I select all text highlighted in a specific colour? Office 2010 32bit
Advanced Beginner
How do I select all text highlighted in a specific colour?
 
Join Date: May 2012
Location: United Kingdom
Posts: 54
bertietheblue is on a distinguished road
Default

Much appreciated!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I select all text highlighted in a specific colour? 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
How do I select all text highlighted in a specific colour? Formatting- Apply changes to highlighted text results in same change to other text sential Word 6 01-10-2014 03:22 PM
How do I select all text highlighted in a specific colour? Quickest way to change text to Arial size 11 specific colour BlueClearSky Word 6 11-22-2013 03:34 PM
How do I select all text highlighted in a specific colour? How to filter sentences wth highlighted colour rajpes Word 4 02-25-2011 12:43 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft