How to remove blank space at the end of a line, quickly?

0

While copying from Outlook and then trying to paste it in MS Word, the pasted email in MS Word appeared detestably as follows, with the trailing blank spaces:
(I just took some arbitrary text bookmarked in my browser; the following isn't the actual email)

So, as usual, there is a tradeoff: With leasing, you will pay a
premium over your lifetime in exchange for a lower monthly payment and very
few concerns about reliability. With an outright
purchase, you're going to come out ahead if you can commit to proper
maintenance and resist the urge to constantly upgrade.

How can I easily and swiftly delete the blank spaces so that each line is filled completely? Manual deletion of the ensuing blank space, line by line, is unproductive. The above should appear as such:

So, as usual, there is a tradeoff: With leasing, you will pay a premium over your lifetime in exchange for a lower monthly payment and very few concerns about reliability. With an outright purchase, you're going to come out ahead if you can commit to proper maintenance and resist the urge to constantly upgrade.

Greek - Area 51 Proposal

Posted 2015-01-12T22:30:19.857

Reputation: 1 024

1I think the desired result is essentially just letting word wrap in whatever app you're using (Word in this case) to fill the rows. Does that sound correct? - The space you're referring to is likely a CRLF, or carriage return/line feed, aka new line, which you can highlight in an app such as Notepad++ and use the Search -> Replace (Ctrl+H) option to replace with a plain space – panhandel – 2015-01-12T22:40:44.283

@panhandel Would you please clarify where is 'word wrap' in Word? I'm no tech expert, so I don't understand how to fix this problem based on your comment? – Greek - Area 51 Proposal – 2015-01-13T01:55:08.930

Answers

1

Search and replace.

1) First replace all paragraph marks with tildes.

Search:   ^p
Replace: ~

2) Next, change two sequential tildes to a paragraph mark.

Search:   ~~
Replace: ^p

3) Last, change remaining tildes to spaces.

Search:   ~
Replace:                 (type a single space in the Replace field)

All done!

If you have a single paragraph, you can skip step 2.

yosh m

Posted 2015-01-12T22:30:19.857

Reputation: 2 048

Thanks, but the first step fails. When I search for ^P, Word then says ^P is not a valid special character for the Find What box.? Please answer in your answer, and not as comments. – Greek - Area 51 Proposal – 2015-01-13T01:52:11.287

@Law Area 51 Proposal - Commit It looks like Word is case-sensitive for special characters. I got the same error with ^P but ^p works. (I made an edit to correct this.) – Kelly Tessena Keck – 2015-01-13T17:28:41.690

@KellyTessenaKeck Thank you. I just tried the above on MS Word 2007 but the space remained. I'll retry on MS Word 2013, but should this still work for Office 2007? – Greek - Area 51 Proposal – 2015-01-13T19:15:44.587

Thanks - yes it should be lower case. I was typing on my phone & erred. Thanks @KellyTessenaKeck for fixing it - including the formatting, which the phone editor did not preserve. Next time I'll stick to answering on my PC's browser... – yosh m – 2015-01-13T21:56:45.867

@LawArea51Proposal-Commit I don't know of any changes to Find & Replace between 2007 and 2013 versions. I would expect it to work on both. When you say the space remained, do you mean you still have manual returns at the end of each line, or that you have extra spaces? – Kelly Tessena Keck – 2015-01-14T14:27:13.940

That set of S&R commands will work on any version of word. What happens when you try to use it? After the first step you should have a lot of tildes - one for every paragraph-break in the original. A double-tilde is for two line breaks in a row. Step two changes those double-tildes into a paragraph break. The third step changes the remaining tildes in blanks so word wrap will work. At what point are you not getting the expected results? – yosh m – 2015-01-14T22:24:41.450