Word 6.0 Line Wrapping Not Retained in Text EditorLast reviewed: February 6, 1998Article ID: Q108451 |
The information in this article applies to:
SYMPTOMSWord-wrapped text that you copy from Word for Windows may paste into a text-based application, such as Windows Notepad or an electronic mail (email) text editor, without carriage returns at the end of each line. This causes the text to appear on a single long line in the text editor. By contrast, wrapped text copied from Word version 2.x for Windows pastes into a text-based application with carriage returns at the end of each line.
CAUSEBy design, Word 6.0 does not include carriage returns at the end of word- wrapped lines in order to comply with OLE (object linking and embedding) version 2.0 specifications. Use the macro in the "Workaround" section below, to add carriage returns to word-wrapped Word 6.0 text.
WORKAROUNDWhen you copy text from Word and paste it into a text-based application such as your email editor, you may want to maintain the word wrapping as it appeared in Word. You can retain the word wrapping as it appears in Word 6.0 using the macro below, which does the following:
Macro TextWARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Sub MAINIf SelType() = 1 Or SelType() = 5 Then MsgBox "There must be a selection for this macro to run."Else ScreenUpdating 0 Print "One moment please..." EditCut ParaDown 1, 1 CopyFormat EditUndo FileNewDefault EditPaste EndOfDocument PasteFormat TmpName$ = Environ$("TEMP") + "\removeme.tmp" FileSaveAs .Name = TmpName$, .Format = 5, .AddToMru = 0 DocClose 2 FileOpen .Name = TmpName$ EditSelectAll EditCopy FileSave DocClose Print "The text has been copied to the Windows Clipboard." Kill TmpName$ ScreenUpdating 1End If End Sub |
KBCategory: kbmacro
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |