I would like to delete a line if a keyword is not found. Can this
be done? This is to mimic what grep program does, sort of.
Hi John,
in case you are talking about paragraphs, not lines:
Dim oPrg As Paragraph
For Each oPrg In ActiveDocument.Paragraphs
If InStr(oPrg.Range.Text, "und") = 0 Then
oPrg.Range.Delete
End If
Next
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
John Smith - 01 Jul 2005 02:50 GMT
> Hi John,
>
[quoted text clipped - 11 lines]
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000
Thanks. You're right. It's indeed paragraphs. Since my paragraphs
are so short, they are literally lines.