View Single Post
 
Old 09-19-2014, 03:35 AM
QA_Compliance_Advisor QA_Compliance_Advisor is offline Windows 7 32bit Office 2010 32bit
Advanced Beginner
 
Join Date: Jul 2014
Posts: 44
QA_Compliance_Advisor is on a distinguished road
Default

I have this code which seems to only change the first cell.


Code:
Function ChangeLogo(wdDoc)
Dim ocell As Cell
For Each ocell In wdDoc.Range.Cells
  With ocell.Shading
    If .BackgroundPatternColor = RGB(51, 51, 153) Then
    .BackgroundPatternColor = RGB(12, 71, 157)
    .ForegroundPatternColor = wdColorWhite
    End If
  End With
Next
End Function
Reply With Quote