![]() |
|
|
|
#1
|
|||
|
|||
|
Thank you, macropod, for your code. I tried it on the test.docx I provided and it seems to work for the first line. But then it seems to get stuck in this loop when it hits a particular wdColorAutomatic Code:
Do While .End < Rng.End - 1
If .Characters.Last.Next.Font.Shading.BackgroundPatternColor = _
.Characters.First.Font.Shading.BackgroundPatternColor Then
.End = .End + 1
Else
Select Case .Font.Shading.BackgroundPatternColor
Case wdColorAutomatic
Case wdColorWhite: .Collapse wdCollapseEnd
Case Else
...
End Select
|
|
#2
|
||||
|
||||
|
The code works fine for me with your test document.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
macropod: The code works fine for me with your test document.
I just tried it again and it works fine for the first 4 highlights (in the first line) but then it get's stuck and never finds the highlight info for the turquoise " uif 5ifbwfot boe u" Do you get info for that one? |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Show field shading in Content Control
|
ajanson | Word | 3 | 08-15-2016 04:49 PM |
Clicking the selected Content Control checkbox returns wrong control in vba event
|
DougsGraphics | Word VBA | 2 | 06-24-2015 07:31 AM |
Question: How to maintain gray shading in text control box
|
tluken | Word | 1 | 08-23-2012 10:20 AM |
Shading, but only when printed
|
WilltheGrill09 | Word | 1 | 03-27-2012 02:44 AM |
Equations shading
|
b0x4it | Word | 4 | 05-18-2011 07:54 PM |