Delete certain characters from a line
I have a situation where I need to go through a document, find a certain word and when that word has been found go down one line and if that line contains either opening or closing parenthesis then delete those two characters.
So:
Word
(sample text)
becomes
Word
sample text
All I have so far is:
Application.ScreenUpdating = False
Selection.HomeKey Unit:=wdStory
With Selection.Find
.ClearFormatting
.Wrap = wdFindStop
.Text = "WORD"
Do While .Execute
Selection.MoveDown Unit:=wdLine, Count:=1
'delete any instances of ( and ) from that line
Loop
End With
Application.ScreenUpdating = True
How can I do this, please? Many thanks.
|