'Line' is a vague concept in Word, but assuming you mean paragraph i.e. a
'line' ending with ¶ then
Sub DeleteQuestions()
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
If LCase(oPara.Range.Words(1)) = "question " Then
oPara.Range.Delete
End If
Next oPara
End Sub
On further reflection, as the character following Question is not stated,
use instead
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
If Trim(LCase(oPara.Range.Words(1))) = "question" Then
oPara.Range.Delete
End If
Next oPara
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.