I am trying to turn off the shading of a range. That is, set it to no shading.
I can set it to white, which usually will be fine, but not turn off shading altogether.
If I set it to Automatic, it is black.
vba turn off shading of selection
-
- 5StarLounger
- Posts: 621
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
-
- Administrator
- Posts: 78531
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: vba turn off shading of selection
Try this:
Code: Select all
Dim rng As Range
Set rng = ...
With rng.Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 621
- Joined: 10 Jan 2016, 15:56
- Location: Madison, Wisconsin
Re: vba turn off shading of selection
Thank you. I will give that a try.
Attorney Charles Kenyon
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word
Templates in Microsoft Word
Modifying the QAT
The Importance of Styles in Microsoft Word