Remove all shading from document at one time

Anonymous
2020-12-14T23:58:40+00:00

Word 2016

Someone in our office used the Shading button to highlight text - instead of the Highlight button.  

It's a 200+ page document with shaded ("highlighted") text throughout.  They now want to remove this shading in one swell swoop - but I haven't been able to figure out how.  You would think you could just select all (CTRL+A), then click the Shading button and select No Color.  But it doesn't work.  It only works when done one item at a time.  

I also tried the below macro, and it didn't work.   Anyone know of a way to do this?  Seems like it should be simple!

Sub Macro1()

    Selection.WholeStory

    Selection.Shading.Texture = wdTextureNone

    Selection.Shading.ForegroundPatternColor = wdColorAutomatic

    Selection.Shading.BackgroundPatternColor = wdColorAutomatic

    Selection.Collapse

End Sub

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2020-12-15T00:03:56+00:00

Wouldn't you know it, right after posting this, I found another macro that worked!  

Sub RemoveShadingandHighlights()

  Selection.Font.Shading.Texture = wdTextureNone

  Selection.Shading.BackgroundPatternColor = wdColorWhite

  Selection.Shading.ForegroundPatternColor = wdColorWhite

  Selection.Range.HighlightColorIndex = wdNoHighlight

End Sub

Was this answer helpful?

10+ people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Stefan Blom 345.4K Reputation points MVP Volunteer Moderator
    2020-12-15T21:25:25+00:00

    The following macro removes all shading (applied to paragraphs as well as to text characters):

    Sub ClearAllShadingFromDoc()

        'Macro created by Stefan Blom, MVP, January 2015

        With ActiveDocument.Content.ParagraphFormat.Shading

            .Texture = wdTextureNone

            .ForegroundPatternColor = wdColorAutomatic

            .BackgroundPatternColor = wdColorAutomatic

        End With

        With ActiveDocument.Content.Font.Shading

            .Texture = wdTextureNone

            .ForegroundPatternColor = wdColorAutomatic

            .BackgroundPatternColor = wdColorAutomatic

        End With

    End Sub

    Was this answer helpful?

    7 people found this answer helpful.
    0 comments No comments