![]() |
#1
|
|||
|
|||
![]()
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! |
#2
|
||||
|
||||
![]()
See, for example: https://www.msofficeforums.com/word-...l-shading.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
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.
|
![]() |
|
![]() |
||||
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 |
![]() |
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 |
![]() |
irinarox | Word | 4 | 05-23-2019 06:22 AM |
![]() |
LSHAW | Word Tables | 1 | 03-09-2017 03:08 PM |