Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-05-2022, 04:16 PM
poetofpiano poetofpiano is offline How to Extract from document all text that has a shade color? Windows 10 How to Extract from document all text that has a shade color? Office 2016
Novice
How to Extract from document all text that has a shade color?
 
Join Date: Sep 2015
Posts: 25
poetofpiano is on a distinguished road
Default How to Extract from document all text that has a shade color?

I often highlight text to mark up a Word doc, but I also prefer to use Dark Mode nowadays, and most of the highlight colors that Word offers look awful against the white text that Dark Mode uses. So I figured I would rewrite the macro that I use to extract all highlighted text in a doc to instead extract all text with shading, because shading offers way more color choices. But then I learned that there is no Selection.Find.Shading.BackgroundPatternColor method in VBA to iterate over all instances of shaded text in a document. Is there a different way to jump to the next instance of shaded text?

Note that instead of using shading, I considered using a character style to mark up text and extract it, but I often mark up Word docs created by other people, so my styles would have to be imported into those docs, which is a pain.



Thanks for any help anyone can offer!
Reply With Quote
  #2  
Old 03-10-2022, 04:06 PM
macropod's Avatar
macropod macropod is offline How to Extract from document all text that has a shade color? Windows 10 How to Extract from document all text that has a shade color? Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,374
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

See, for example: https://www.msofficeforums.com/word-...l-shading.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-14-2022, 08:43 AM
Peterson Peterson is offline How to Extract from document all text that has a shade color? Windows 10 How to Extract from document all text that has a shade color? Office 2019
Competent Performer
 
Join Date: Jan 2017
Posts: 143
Peterson is on a distinguished road
Default

I looked into this a bit, and shading coloring seems to be an odd, complicated beast in Word. If you have specific set of shading colors you use, I could modify some existing code I have to apply a character style to every instance. But I'd need a function to determine any possible shading color and wasn't able to find one.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help, How to do a Find in a Table, then Shade color? Cendrinne Word VBA 11 01-10-2022 10:36 PM
How to Extract from document all text that has a shade color? Extract and insert text data from excel table(s) in a (embed) Word document vladimiratanasiu Word 4 12-17-2020 05:25 AM
VBA to extract/hide text by font color? tyxanu Excel Programming 5 09-02-2020 03:17 PM
How to Extract from document all text that has a shade color? Word - cannot shade text - difficult formatting in the backgroud irinarox Word 4 05-23-2019 06:22 AM
How to Extract from document all text that has a shade color? Text area in table won't shade LSHAW Word Tables 1 03-09-2017 03:08 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:46 AM.


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