Word 6.0 Line Wrapping Not Retained in Text Editor |
Q108451
The information in this article applies to:
- Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
SYMPTOMS
Word-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.
CAUSE
By 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.
WORKAROUND
When 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:
- Cuts the selection, with paragraph formatting intact, and places it on the Windows Clipboard (the macro later restores the selection to its original position).
- Opens a new document into which it pastes the selection.
- Saves the new document to the TEMP directory in Text Only With Line Breaks file format, then closes the file.
- Reopens the Text Only file, which now contains a paragraph mark at the end of each line.
- Selects and copies the entire document.
- Saves the file again (this removes the pointers to the Windows Clipboard, which makes it possible to delete the file).
- Closes and deletes the file.
Macro Text
WARNING: 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 MAIN If 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 1 End If End Sub
Additional query words: 6.0 ascii ansi DOS editor e-mail winword word6
Keywords : kbole kbformat
Issue type :
Technology :
Last Reviewed: November 4, 2000 |