ID: Q108451
The information in this article applies to:
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.
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.
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:
1. Cuts the selection, with paragraph formatting intact, and places it on
the Windows Clipboard (the macro later restores the selection to its
original position).
2. Opens a new document into which it pastes the selection.
3. Saves the new document to the TEMP directory in Text Only With Line
Breaks file format, then closes the file.
4. Reopens the Text Only file, which now contains a paragraph mark at the
end of each line.
5. Selects and copies the entire document.
6. Saves the file again (this removes the pointers to the Windows
Clipboard, which makes it possible to delete the file).
7. Closes and deletes the file.
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
KBCategory: kbmacro
KBSubcategory: kbformat
Additional query words: 6.0 ascii ansi DOS editor e-mail winword
word6 6.0a 6.0c
Keywords : kbole kbformat
Version : 6.0 6.0a 6.0c
Platform : WINDOWS
Last Reviewed: February 7, 1998