THURMAN SMITH
asked on
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.
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.
ASKER
^p^l^p^l search/replace found nothing!
OBCARE.txt
OBCARE.txt
ASKER
Actually I learned from a MS forum that ^p covers a CRLF pair. That why ^p^l wasn't finding anything.
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
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
which adds a CRLF (hex 13 09) at the end of each lineCrLf is x0D0A and not x1309
Please verify these EOL characters for us.
Please post a sample text file.
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
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
ASKER
Thanks, but this solution removed the space between many of the words within a line.
Yes xODOA are the CRLF values in the document.
Yes xODOA are the CRLF values in the document.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
aikimark Revised much better, but it did add a space between two words in several cases on each page.
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
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
@smithtoff
Where were the extra spaces?
Where were the extra spaces?
ASKER
No responses quite worked.
@smithtoff
Please answer my question. Where were the extra spaces?
Please answer my question. Where were the extra spaces?
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.