From: Elfego Baca on
I have a very large word document, over 1000 pages. There are over 10,000
phrases within parenthesis that contain the word memo) I would like a macro
that would look for all instances of parenthesis that contains the word
'memo' and removed the entire phrase including the opening and ending
parenthesis. For example I need a macro that would remove the following
groups:
(red sunset memo) (memo san francisco) (edward the great memo), but would
not remove (John Smith explorer)
--
Butch Cassidy
From: Graham Mayor on
The solution is only slightly different from that to which you asked
yesterday

Sub FindAndDeleteSpecial()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "\(*<memo>*\)"
Do While .Execute(Forward:=True, _
MatchWildcards:=True) = True
oRng.Delete
Loop
End With
End Sub

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


"Elfego Baca" <ElfegoBaca(a)discussions.microsoft.com> wrote in message
news:3842464A-03F0-4B39-8513-BD96634C18E4(a)microsoft.com...
>I have a very large word document, over 1000 pages. There are over 10,000
> phrases within parenthesis that contain the word memo) I would like a
> macro
> that would look for all instances of parenthesis that contains the word
> 'memo' and removed the entire phrase including the opening and ending
> parenthesis. For example I need a macro that would remove the following
> groups:
> (red sunset memo) (memo san francisco) (edward the great memo), but would
> not remove (John Smith explorer)
> --
> Butch Cassidy