View Single Post
 
Old 03-05-2022, 04:16 PM
poetofpiano poetofpiano is offline Windows 10 Office 2016
Novice
 
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