View Single Post
 
Old 10-25-2021, 01:26 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
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 ofgmayor has much to be proud of
Default

Try the following


Code:
Sub Macro1()
Dim i As Long
Dim oTable As Table
    For Each oTable In ActiveDocument.Tables
        For i = oTable.Rows.Count To 1 Step -1
            If oTable.Cell(i, 1).Shading.BackgroundPatternColor = &HCCFF00 Or _
               oTable.Cell(i, 1).Shading.BackgroundPatternColor = &HB2B2B2 Then
                oTable.Rows(i).Delete
            End If
        Next i
        DoEvents
    Next oTable
    Set oTable = Nothing
End Sub
__________________
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