Microsoft Knowledge Base Email Alertz

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.

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











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

On This Page

SYMPTOMS

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.

CAUSE

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.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. 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).
  2. Start Word 2002. A new document is created.
  3. 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.
  4. Save and close the document.
  5. Reopen the document. Note that there are now two CRs after the 256th character.

APPLIES TO
  • Microsoft Word 2002
Keywords: 
kbbug kbpending KB313198
       

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