The code works. Run this code in a new document to illustrate.
Code:
Sub Color()
With ActiveDocument
.Tables.Add Selection.Range, 5, 5
.Tables(1).Cell(2, 3).Shading.BackgroundPatternColor = RGB(51, 51, 153)
.Tables(1).Cell(3, 2).Shading.BackgroundPatternColor = RGB(51, 51, 153)
ChangeLogo ActiveDocument
End With
End Sub
Function ChangeLogo(wdDoc)
Dim oCell As Cell, oTbl As Table, oRow As Row
Dim i As Long
For Each oTbl In wdDoc.Tables
For Each oRow In oTbl.Rows
For Each oCell In oRow.Cells
If oCell.Shading.BackgroundPatternColor = RGB(51, 51, 153) Then
oCell.Shading.BackgroundPatternColor = RGB(12, 71, 157)
End If
Next
Next
Next
End Function