Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 313198 - Last Review: October 23, 2006 - Revision: 1.2
BUG: Word 2002 Adds a Carriage Return in the Middle of Plain Text Inserted From the Clipboard or File
This article was previously published under Q313198
When you insert plain text either from the clipboard or from a file in a Word 2002 document, and you then save and reopen the document, you may see an extra carriage return (CR) in the section in which you added the plain text.
The problem occurs if the plain text has a carriage return/line feed (CR/LF) at the position that is 256 (or a multiple of 256) characters from the start of the text. The problem is not visible at the time of the insert.
Word uses single CR characters for its paragraph returns. A problem in the code that parses plain text and converts CR/LF pairs into single CR characters causes the CR and LF to become separated at 256 characters (that is, the CR is the 256th character, and the LF is the 257th), so Word treats the characters separately instead of as a pair.
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Steps to Reproduce Behavior
- Create a text file with a CR/LF that is exactly 256 characters from the start of the file (including spaces, punctuation, and non-printing characters).
- Start Word 2002. A new document is created.
- On the Insert menu, click File. Insert the text file that you created. Note that the plain text is inserted into the Word document and that it appears correct.
- Save and close the document.
- Reopen the document. Note that there are now two CRs after the 256th character.
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate