Sub RemoveWelshLines(doc As Object)
Dim wdApp As Object 'Word.Application
'Dim doc As Word.Document
'Set wdApp = doc.Application
wdApp = doc.Application
doc.Range.Select
wdApp.Selection.Find.Text = "Filed:"
Do While wdApp.Selection.Find.Execute(FindText:="Filed:", Forward:=True, _
Format:=True) = True
With wdApp.Selection
.Expand Unit:=wdLine
.Delete
End With
Loop
End Sub
|