fredlo2010
04-25-2012, 11:31 AM
Hi,
I need to search for a text string in a footer and then delete the table row that contains it.
Dim sText As String
Dim bmRange As Range
Application.ScreenUpdating = True
'DELETE ALL SUBTOTAL LINES
sText = "Subtotal"
Selection.Find.ClearFormatting
With Selection.Find
.Text = sText
.Wrap = wdFindContinue
End With
Do While Selection.Find.Execute
If Selection.Information(wdWithInTable) Then
Selection.Rows.Delete
End If
Loop
This works find for the document body but not the footer
Thanks
I need to search for a text string in a footer and then delete the table row that contains it.
Dim sText As String
Dim bmRange As Range
Application.ScreenUpdating = True
'DELETE ALL SUBTOTAL LINES
sText = "Subtotal"
Selection.Find.ClearFormatting
With Selection.Find
.Text = sText
.Wrap = wdFindContinue
End With
Do While Selection.Find.Execute
If Selection.Information(wdWithInTable) Then
Selection.Rows.Delete
End If
Loop
This works find for the document body but not the footer
Thanks