Microsoft Office Forums Search for text then delete line

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-06-2012, 06:14 AM
konopca konopca is online now Search for text then delete line Windows XP Search for text then delete line Office 2003
Novice
Search for text then delete line
 
Join Date: Apr 2011
Posts: 27
konopca is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 06-06-2012, 05:29 PM
macropod's Avatar
macropod macropod is offline Search for text then delete line Windows 7 64bit Search for text then delete line Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,577
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

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
[MS MVP - Word]
Reply With Quote
  #3  
Old 06-07-2012, 02:44 AM
konopca konopca is online now Search for text then delete line Windows XP Search for text then delete line Office 2003
Novice
Search for text then delete line
 
Join Date: Apr 2011
Posts: 27
konopca is on a distinguished road
Default

That's excellent! Thank you.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Search for text then delete line Very Urgent - Not able to delete Line krishnaoptif Drawing and Graphics 11 05-29-2012 11:25 AM
Search for text then delete line Need help on Macro 03- Find text - if text is blank then remove line simpleonline1234 Word VBA 1 02-25-2011 02:28 AM
Search for text then delete line 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


All times are GMT -7. The time now is 04:45 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft