1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Is there a "find and delete (not replace)" option in Word?

Discussion in 'Mac Applications and Mac App Store' started by aoitsukinosuke, Jan 21, 2013.

  1. macrumors regular

    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?

  2. macrumors 6502

    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'.
  3. macrumors regular

    I do that from time to time for other things, either a space or a dot.

    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.
  4. macrumors G4

    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.
  5. macrumors 6502a

    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.
  6. macrumors regular

    MisterMe - Thanks for the suggestion. I got Text Wrangler and played with it for a while with no end result. It's definitely me being in unfamiliar territory, but I gave up in the end.

    drambuie - Thank you, but that's not what I'm looking for .
  7. macrumors G5


    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.
  8. macrumors regular

    Oh man. I'd be so grateful. I'll be looking forward to it. TIA.
  9. macrumors G5


    Take a look here..It seems we are on the right track...I don't have Word on this MBA, but do on my iMac and MBP...Have a try yourself:
  10. macrumors G5


    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.
  11. macrumors regular

    MacMan45 - Thanks for your time.

    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. :D
  12. macrumors member

    Just use textedit...
  13. macrumors regular

    Thessman - To do??? What can I do with Textedit that I can't do with Word?

    I want to simply perform a Find & Delete, instead of Find & Replace.
    Does Textedit have that capability? If yes, I'd appreciate it if you could direct me.
  14. macrumors 6502a

    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.
  15. macrumors regular

    drambuie - Thank you. I followed yr advice and got halfway thru.

    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?
  16. macrumors 6502

    I make a guess (without seeing what you are doing) that Word is not getting that the characters you are typing are meant to be interpreted. In the F/R dialog box, click on the "more" button to see the search options, then use the "special" button to enter the symbol you want to look for--line or paragraph break.
  17. macrumors member

    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.
  18. macrumors regular

    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.
  19. macrumors 6502a

    In TextWrangler, Search->Find... Enter "\r" to search for carriage returns, and replace with " ", without the quotes. I just tried it, and it works.
  20. macrumors regular

    rbrian - I wrestled with TextWrangler following MisterMe's post. Not my cup of tea.
    Thanks for the suggestion.
  21. macrumors member

    Just copy the whole line with the word and the line break and paste it in the find field. Works for me anyway...
  22. macrumors regular

    Line break?

    Is this what you mean? "Share ^l"


    I found it.
    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.
  23. macrumors 6502

    Sorry--my own copy is several versions old. I switched to openoffice long ago.
  24. macrumors 6502a

    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.
  25. JAT
    macrumors 603

    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.

Share This Page