|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Is there a "find and delete (not replace)" option in Word?
The title pretty much says it all.
I am using Word for Mac 2011 and use the "Find and Replace" command all the time. However, I need Word to find an array of repetitive phrases and simply delete them. Is this possible or just wishful thinking? TIA. |
|
|
|
0
|
|
|
#2 |
|
I've done that in the past by leaving a space in the 'replace' field. Don't know if that would work for you tho'.
|
|
|
|
0
|
|
|
#3 | |
|
Quote:
I should have expressed myself better. I copy forum threads related to my line of work from Firefox to Word. There are phrases like "Leave a comment" and they take up a line by themselves. After every reply in the thread, there is this phrase and I end up hundreds of lines with only this phrase. That's what I'm trying to delete. The phrase and the unnecessary line space it takes. If I replace them with something, anything, the line still stays there. Hope I've made myself clearer this time. |
||
|
|
0
|
|
|
#4 |
|
It sounds like you are using the wrong tool. You need to remove carriage returns which is difficult to do using a word processor like Word. Yours is a job for a text editor like the free Text Wrangler.
__________________
Neither a borrower nor a lender be For loan oft loses both itself and friend William Shakespeare from Hamlet |
|
|
|
0
|
|
|
#5 |
|
You can use ^p to find a paragraph ending, or ^l for a line ending. So, to remove line feeds you would search for ^l and replace with , that is, replace with nothing. That function has been in MS Word since the DOS versions in the early 1990s. You'll have to experiment to find the best use of these for your requirements.
|
|
|
|
0
|
|
|
#6 | ||
|
Quote:
Quote:
|
|||
|
|
0
|
|
|
#7 |
|
I'm wondering if this could be done with a Macro? It's been years since I used Word that seriously, but I will try later on.
__________________
Time And Tide Wait For No Man
|
|
|
|
0
|
|
|
#8 |
|
|
0
|
|
|
#9 | |
|
Quote:
http://word.mvps.org/mac/installmacro.html
__________________
Time And Tide Wait For No Man
|
||
|
|
0
|
|
|
#10 |
|
Hmm, I can make it work on a per document basis, but can't remember the correct term for "Global" application of a Macro.
The way you record them without actually coding is to press the record button, then perform the actions you want to achieve, then stop the recording an save the macro with an appropriate file name for use on the documents you want. But at the moment, I'm stuck.
__________________
Time And Tide Wait For No Man
|
|
|
|
0
|
|
|
#11 | |
|
Quote:
I went to your link and then clicked "Creating a macro with no programming experience using the recorder" which gave me the exact instructions as yours. Being a complete stranger to macros, I'll fiddle around between work and see if I can do something. If I do, I'll post it here. If not, I'll wait for you. Thanks again. You're cool.
|
||
|
|
0
|
|
|
#12 |
|
Just use textedit...
|
|
|
|
0
|
|
|
#13 |
|
|
0
|
|
|
#14 |
|
Maybe I didn't make my suggestion clear enough. Find and Replace is functionally identical to Find and Delete if you enter nothing into the Replace field. Everything that matches the Find criteria will disappear. If a complete line is to be deleted, and you end the Find criteria with ^l (caret+lower case L), that entire line and the space it occupies will disappear, and the rest of the document will move up one line. If you're going to end up with unneeded double spaces, enter ^l twice at the end of the Find phrase.
|
|
|
|
0
|
|
|
#15 | |
|
Quote:
Please bear with me. I'm trying to delete "Share" along with the line it occupies. (as you put it correctly) I went to Edit>Find>Replace. When I enter "share" in Find and leave Replace blank, it deletes "share" but leaves a blank line there. But, I can't get the deleting line part to work. If I enter "share^l" in Find, nothing happens. If I enter "share" in Find and enter "^l" in Replace, still the word is gone but the empty line is there. Where am I going wrong? |
||
|
|
0
|
|
|
#16 | |
|
Quote:
|
||
|
|
0
|
|
|
#17 |
|
Open a copy of your file in textedit, press alt cmd f, enter your search criteria in the "find" field ( you can insert line breaks etc. by clicking on the little arrow beside the magnifying glass in the "Find" field ) and leave the replace field empty. Press the "all" button and you're done.
|
|
|
|
0
|
|
|
#18 |
|
MacCruiskeen - I inserted ^ as a special character instead of typing. Not a change.
FYI - My Word 2011 doesn't have a More option or a special button. Thessman - What you suggest only deletes the word, not the line itself and we've already covered that with drambuie. Thanks for your time. |
|
|
|
0
|
|
|
#19 |
|
In TextWrangler, Search->Find... Enter "\r" to search for carriage returns, and replace with " ", without the quotes. I just tried it, and it works.
__________________
2011 11" Air i5 1.6/4/128; 2011 Mac mini; iPad 3 32GB WiFi; iPhone 5 64GB; Apple TV3 |
|
|
|
0
|
|
|
#20 |
|
|
0
|
|
|
#21 | |
|
Quote:
|
||
|
|
0
|
|
|
#22 | ||
|
Quote:
Is this what you mean? "Share ^l" ---------- Quote:
Edit>Find>Advanced Find and Replace But doesn't work as you thought it would. Boy, all this help from you nice people and I can't seem to get it going. |
|||
|
|
0
|
|
|
#23 |
|
|
0
|
|
|
#24 |
|
TextWrangler's manual has an entire chapter on GREP that will show you how to write regular expressions to find and manipulate just about anything. There are third party add-ons that extend word to support regex as well, but not free ones as far as I know.
|
|
|
|
0
|
|
|
#25 |
|
Turn on the ¶ mode (Show all non printing characters), so your document shows all the hidden characters as a symbol, like space and return. Then it is easier to highlight and copy them into the Advanced Replace window. Just leave the "Replace with" field blank to delete, don't put a space in there or anything, just blank. I've been doing this in Word and Excel since the early 90s, almost daily. If you do this enough, you'll get used to how it works and you won't need the ¶ mode, anymore.
__________________
-- Spiky |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 10:43 AM.







Linear Mode
