Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


find and replace shading

Posted on 2008-10-06
Medium Priority
Last Modified: 2011-10-03
Hi all,
I have a document where parts of the text are highlighted or shaded in light yellow. It seems I can't use standard search and replace to replace the highlighted text.

Can anyone help me to find a way to find the shaded parts in the document?
Question by:Shawn
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5

Author Comment

ID: 22653642
this is what I need to find
.BackgroundPatternColor = wdColorYellow
and need to replace any highlighted text with "" (nothing).

The end goal is to count the words that are not highlighted.
LVL 31

Expert Comment

ID: 22653678
You can do that with the search and replace feature, but you need to use the advanced options.

- Ctrl + H
- 'More' button
- 'Format' button
- Highlight (Highlight appears under box for Find what)
- Repeat last 2 steps for Replace With box
- Use the Highligher icon in the main Word window (the pencil with ab, next to character color) and select the desired new color - select 'none' to erase.
- Replace all, or Find Next and Replace as desired if you want to keep some. * note this will change all highlighted items if you replace all, not just any particular color.  (for font/text color, you can actually look for the specific color and be more granular, for backgrounds/highlight you cannot).


Author Comment

ID: 22653761
I have tried this already but no success
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

ID: 22653803
it is not actually the "highlight" function I am looking for it is the  .BackgroundPatternColor = wdColorLightYellow.

the results can be similar looking but I'm pretty sure BackgroundPatternColor  needs to be searched via  a macro using VB
LVL 37

Expert Comment

by:Joanne M. Orzech
ID: 22680355
Deleted post.

Author Comment

ID: 22680389

Accepted Solution

Shawn earned 0 total points
ID: 22715395
got it...thanks anyway.

here's the end great

Sub FindHighlightedText()

Selection.HomeKey Unit:=wdStory

With Selection.Find
.Font.Shading.BackgroundPatternColor = wdColorLightYellow
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Execute Replace:=wdReplaceAll

End With

End Sub

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
Suggested Courses

722 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