Removing Carragie returns in Word

  robert21 21:41 22 Jan 04

Is it possible to autmate the removal of hard returns placed at the end of each line when pasting text from Web pages or mail into Word? I can remember a macro from some time ago but can't find it.

  Chris the Ancient 21:53 22 Jan 04

The macro that you need is as follows...

Sub FixLines()

Dim dowhat

dowhat = 1

If WordBasic.SelType() = 2 Then

dowhat = 0

End If

WordBasic.editreplace Find:="^p",

Replace:="@@@", Direction:=0, ReplaceAll:=1,


WordBasic.editreplace Find:="@@@@@@",

Replace:="^p^p", Direction:=0, ReplaceAll:=1,


WordBasic.editreplace Find:="@@@", Replace:=" ",

Direction:=0, ReplaceAll:=1, Wrap:=dowhat

With Selection
.HomeKey unit:=wdStory
.Range.Case = wdUpperCase
.Range.Case = wdTitleSentence
.HomeKey unit:=wdStory

End With

End Sub

  Chris the Ancient 21:53 22 Jan 04

New line between the last end with and end sub

  Eric10 21:54 22 Jan 04

Can't you just use 'Edit, Replace' and replace the paragraph mark with a space. In the 'Replace' dialogue box click the 'More' button and you will find 'Paragraph Mark' and much more by clicking the 'Special' button.

This thread is now locked and can not be replied to.

Nintendo Switch (Nintendo NX) release date, price, specs and preview trailer: Codename NX console…

1995-2015: How technology has changed the world in 20 years

8 things designers (and brands) need to know about the modern woman

How to speed up a slow Mac: 19 great tips to make an iMac, MacBook or Mac mini run faster | Speed…