#1
|
|||
|
|||
Search for text then delete line
I want to search for the text "MISC" and if found, delete the whole paragraph. I seem to remember a post similar to this but can find it.
Thanks, Carol |
#2
|
||||
|
||||
Hi Carol,
Provided MISC neither starts nor ends a paragraph, you can do this via a wildcard Find/Replace, where: Find = [!^13]@MISC[!^13]@^13 Replace = nothing If MISC starts a paragraph, you can do this via a wildcard Find/Replace, where: Find = MISC[!^13]@^13 Replace = nothing Similarly, if MISC ends a paragraph, you can do this via a wildcard Find/Replace, where: Find = [!^13]@MISC^13 Replace = nothing No macros required. Of course, these could be encoded as a macro, even using the macro recorder.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
That's excellent! Thank you.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Very Urgent - Not able to delete Line | krishnaoptif | Drawing and Graphics | 11 | 05-29-2012 11:25 AM |
Need help on Macro 03- Find text - if text is blank then remove line | simpleonline1234 | Word VBA | 1 | 02-25-2011 02:28 AM |
Line breaks at each line in Web text | ahazelwood | Word | 5 | 01-06-2011 02:37 PM |
Delete text | Michael007 | Office | 13 | 01-01-2011 10:38 PM |
Cannot delete line | adkr | Office | 1 | 04-07-2010 09:26 PM |