MS WORD TEXT IMPORT NOT WORDWRAPPING

I have plain ASCI text files created in an edit program, (VEDIT) which adds a CRLF (hex 13 09) at the end of each line when writing.  (I add an extra carriage return to start a new paragraph.)
I want to import these  files into MS WORD 2007, which unfortunately does not ignore the single CRLF pairs, so the line breaks are not always appropriate for the MS WORD session (some lines are too short).  How do I get WORD to word wrap the file at import time?  Or if that if not a feature, is there any way to efficiently wrap the text after importing.
THURMAN SMITHPrincipalAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CompProbSolvCommented:
One way to do it involved search and replace.  The idea is to search for CRLF and replace it with nothing.  The problem is that it will also delete the paragraph breaks that you have created.  Assuming you have  CRLF CRLF where you want the paragraph breaks, the following should work:

Note: to search for CR, use ^p  ; for LF use ^l

Search for ^p^l^p^l and replace with xyzxyz (or any other string that doesn't appear in your document.  This will preserve your paragraph breaks.

Search for ^p^l and replace with a space.  I'm assuming that there is not already a space.  This will get rid of the unwanted line breaks.

Search for xyzxyz (or whatever else you used earlier) and replace with ^p^l.  That should put the paragraph breaks back in.
0
THURMAN SMITHPrincipalAuthor Commented:
^p^l^p^l   search/replace  found nothing!
OBCARE.txt
0
THURMAN SMITHPrincipalAuthor Commented:
Actually I learned from a MS forum that ^p covers a CRLF pair. That why ^p^l wasn't finding anything.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Rgonzo1971Commented:
Hi,

You could find and replace
1.
Find what: ^p
Replace With: ^l
2.
Find what: ^l^l
Replace With: ^p^p
1.
Find what: ^l
Replace With:
(Nothing in replace With)

Regards
1
aikimarkCommented:
which adds a CRLF (hex 13 09) at the end of each line
CrLf is x0D0A and not x1309

Please verify these EOL characters for us.

Please post a sample text file.
0
aikimarkCommented:
I did the following find/replace operations:
Replace all ^p^p with ####
Replace all ^p with ""  (empty string)
Replace all #### with ^p^p

the attached Word document is the result
OBCARE.docx
0
THURMAN SMITHPrincipalAuthor Commented:
Thanks, but this solution removed the space between many of the words within a line.
Yes xODOA are the CRLF values in the document.
0
aikimarkCommented:
Revised commands:
Replace all ^p^p with ####
Replace all  ^p (space followed by paragraph) with " "  (single space character)
Replace all ^p with " "  (single space character)
Replace all #### with ^p^p
OBCARE.docx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
THURMAN SMITHPrincipalAuthor Commented:
Rgonzo1971   solution resulted in many a space dropped between two words/.


aikimark  Revised much better, but it did add a space between two words in several  cases on each page.
0
Rgonzo1971Commented:
HI,

then try

Hi,

 You could find and replace
 1.
 Find what: ^p
 Replace With: ^l
 2.
 Find what: ^l^l
 Replace With: ^p^p
 3.
 Find what: ^l
 Replace With:
 (Space)
4.
 Find what:
 (Space)(Space)
 Replace With:
 (Space)

 Regards
0
aikimarkCommented:
@smithtoff

Where were the extra spaces?
0
THURMAN SMITHPrincipalAuthor Commented:
No responses quite worked.
0
aikimarkCommented:
@smithtoff

Please answer my question.  Where were the extra spaces?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.