View Single Post
 
Old 01-30-2013, 04:23 AM
konopca konopca is offline Windows XP Office 2003
Novice
 
Join Date: Apr 2011
Posts: 27
konopca is on a distinguished road
Default

Hi Lebber - I don't use table styles so I can't help you with that. But I do have some code that I use to highlight every other table row. I hope it works for you; if it doesn't I probably can't help you there either as only dabble in macros. Here it is: First, remove all shading and then put your cursor in the first row that you want to apply shading.

Code:
 
Sub ShadeEveryOtherTblRow()
'
' Macro1 Macro
'
'This counter performs the shading on the stated number of rows
Do While intCounter < 7
intCounter = intCounter + 1
'The following highlights the row the cursor is on (the first row that you want shaded)
Selection.EndKey Unit:=wdRow, Extend:=True
'The following formats the row as a shade of grey
With Selection.Cells
With .Shading
.BackgroundPatternColor = -603930625
End With
End With
'The following moves the cursor down two rows
Selection.EndKey Unit:=wdRow
Selection.MoveRight Unit:=wdCell
Selection.EndKey Unit:=wdRow
Selection.MoveRight Unit:=wdCell
Loop
End Sub
Reply With Quote