Convert To one line Text

S

sigh

Hi,
I would like to write a macro to convert the following
address to only one line, so I can import in to the Excel
easily. Examples of one address:

AAA XXXX STORES LTD.
1370 SONY PLACE
Sanigo, CANADA
R3C 3C3

TO

AAA XXXX STORES LTD, 1370 SONY PLACE Sanigo, CANADA R3C3C3

Some of the address have 5 or 6 rows and also the empty
Lines between each address.

The text file contend alot of Lines (address) almost more
then 300 address. Is't anything that I can ran the macro
to convert all at once.

Any help would be very appreciated.
 
D

Doug Robbins - Word MVP

Hi sigh,

Click on the ¶ button to see what is being used to terminate each line. If
each line is terminated with a ¶ and empty line between each address
contains a ¶ as well, then use Edit>Replace and in the Find what box, insert
^p^p and in the replace with box put $$$.

Now do another Edit>Replace with ^p in the Find what box and a space in the
Replace with box. Finally, to another one with $$$ in the Find what box and
^p in the Replace with box.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top