Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.
Sub TblAltShadingGrey() Dim oRow As row Dim rng As Word.range Dim tbl As Table Dim StartRow As Long Dim ShadedRow As Boolean If Not Selection.Information(wdWithInTable) Then MsgBox "Please place the cursor into the table", vbOKOnly + vbCritical, "Alternate Grey Shading for selected Table" Exit Sub End If StartRow = InputBox("Grey Shading: Enter starting row:", "Alternate Grey Shading") Set tbl = Selection.Tables(1) Set rng = tbl.range For Each oRow In tbl.rows If oRow.Index >= StartRow Then ShadedRow = Not ShadedRow If ShadedRow Then oRow.Cells.Shading.BackgroundPatternColor = RGB(225, 225, 225) Else oRow.Cells.Shading.BackgroundPatternColor = wdColorAutomatic End If End If Next End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.