Prev: How do you change the font size and color in insert caption?
Next: opening word 07 in word 03 (office)
From: Elfego Baca on 5 Apr 2010 22:29 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 6 Apr 2010 00:42
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 |