![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#2
|
||||
|
||||
|
This might get you started - select a paragraph and run the macro to remove the shading from paragraphs with that same colour.
Note: Your results might vary according to how the colours are applied. In my quick testing the macro was greedy and removed colours from other paragraphs that were coloured from the same row of the colour palette (ie same tint level). It worked fine if the colours came from other levels of tint or were defined in RGB. Code:
Sub Macro2()
Dim iCol As Long
iCol = Selection.Shading.BackgroundPatternColor
With ActiveDocument.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = ""
.ParagraphFormat.Shading.BackgroundPatternColor = iCol
.Replacement.ParagraphFormat.Shading.BackgroundPatternColorIndex = wdWhite
.Execute Replace:=wdReplaceAll
End With
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
| Tags |
| color, selection, shading |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Remove shading in numbered headings
|
Marcia | Word | 3 | 08-21-2020 10:54 AM |
| Color and Transparency in Word Table shading | mikejvir | Word Tables | 2 | 07-14-2020 08:48 AM |
Can't apply shading to multiple sentences
|
alex100 | Word VBA | 5 | 06-10-2020 09:31 AM |
| Macro to change an RGB table cell shading color to another RGB color | David Matthews | Word VBA | 4 | 05-29-2018 02:45 PM |
How to apply formatting(color & shading) to specific letters in whole doc. (arabic)
|
loopseye | Word | 3 | 08-05-2013 10:49 PM |