View Single Post
 
Old 09-19-2014, 04:38 AM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You need to identify the table the cells are in e.g.

Code:
Function ChangeLogo(wdDoc)
Dim oTable As Table
Dim ocell As Cell
    Set oTable = wdDoc.Tables(1)
    For Each ocell In oTable.Range.Cells
        With ocell.Shading
            If .BackgroundPatternColor = RGB(51, 51, 153) Then
                .BackgroundPatternColor = RGB(12, 71, 157)
                .ForegroundPatternColor = wdColorWhite
            End If
        End With
    Next ocell
End Function
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote