I found and adapted this which may work for you:
Code:
Sub QuerryAllTables()
Dim oTbl As Table
Dim oRng As Range
For Each oTbl In fcnCollectDocTables
'MsgBox "Cell count: " & oTbl.Range.Cells.Count & " - Nesting level:" & oTbl.NestingLevel
If oTbl.NestingLevel > 1 Then
Set oRng = oTbl.Range
With oRng.Find
.Text = "XXX text"
Do While .Execute
If oRng.InRange(oTbl.Range) Then
oRng.Rows(1).Delete
Else
Exit Do
End If
Loop
End With
End If
Next
lbl_Exit:
Exit Sub
End Sub
Function fcnCollectDocTables(Optional ByVal oDoc As Document) As Collection
'Returns all tables (top level and nested) in one collection.
Dim colStack As New Collection
Dim oTbl As Table
Set fcnCollectDocTables = New Collection
If Documents.Count > 0 And oDoc Is Nothing Then
Set oDoc = ActiveDocument
Else
GoTo lbl_Exit
End If
colStack.Add oDoc.Tables
Do While colStack.Count > 0
For Each oTbl In colStack(1)
fcnCollectDocTables.Add oTbl
If oTbl.Tables.Count > 0 Then colStack.Add oTbl.Tables
Next
colStack.Remove 1
Loop
lbl_Exit:
Exit Function
End Function