I recently wrote below (simple) macro which changes the row colour of
a table from blue to yellow. Is it possible to define a custom colour
such as RGB (17, 33, 55). And if this is possible, how do I have to
rewrite this macro.

Help is appreciated. Thank you very much in advance.

Regards,

Andreas


Sub ChangeShading()

Dim oRw As Row

For Each oRw In ActiveDocument.Tables(1).Rows
If oRw.Cells.Shading.BackgroundPatternColor = wdColorBlue Then
oRw.Cells.Shading.BackgroundPatternColorIndex = wdColorLightYellow
End If
Next
End Sub

RE: Define a custom RGB Colour using VBA by HelmutWeber

HelmutWeber
Wed Mar 14 08:59:26 CDT 2007

Hi Andreas,


BackgroundPatternColor = RGB (17, 33, 55)

HTH


--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000 (german versions)


Re: Define a custom RGB Colour using VBA by andreas

andreas
Thu Mar 15 01:00:30 CDT 2007

On 14 Mrz., 14:59, Helmut Weber
<HelmutWe...@discussions.microsoft.com> wrote:
> Hi Andreas,
>
> BackgroundPatternColor = RGB (17, 33, 55)
>
> HTH
>
> --
> Greetings from Bavaria, Germany
> Helmut Weber, MVP WordVBA
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000 (german versions)

Hey Helmut,
Thank you.