View Single Post
 
Old 06-27-2019, 07:17 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub DeleteRowsKEYWORD()
Dim TargetText As String
Dim oRow As Row
  If Selection.Information(wdWithInTable) = False Then Exit Sub
  TargetText = "KEYWORD"
  For Each oRow In Selection.Tables(1).Rows
    If InStr(oRow.Cells(4).Range.Text, TargetText) = 0 Then oRow.Delete
  Next oRow
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote