Reply
 
Thread Tools Display Modes
  #1   Report Post  
vicb
 
Posts: n/a
Default How to Remove manual line breaks from word docs?

Need to learn how to remove hard line breaks from a Word.doc to allow text
flow the entire witdth of page.

This document is 85 pages and can remove line by line but this would take
hours.

Thank you in advance for input and assistance.

VB
  #2   Report Post  
Greg Maxey
 
Posts: n/a
Default

vicb

This macro will clean up line breaks. See:
http://www.gmayor.com/installing_macro.htm if you need help applying:

Sub CleanUpText()

Dim EP As Paragraph
Dim TextChar As String
Dim bCutChars As Boolean

If MsgBox("Do you want to remove leading spaces or characters?", vbYesNo) =
vbYes Then
ActiveDocument.Range(0, 0).Select
Selection.Range.InsertAfter Chr(13)
bCutChars = True
CUTReplaceSpecific "(^13)( {1,})", "\1"
CUTReplaceSpecific "(^l)( {1,})", "\1"
CUTReplaceSpecific "(^l)([\ ]{1,})", "\1"
CUTReplaceSpecific "(^13)([\ ]{1,})", "\1"
CUTReplaceSpecific "(^l)([\]{1,})", "\1"
CUTReplaceSpecific "(^13)([\]{1,})", "\1"
CUTReplaceSpecific "(^13)( {1,})", "\1"
CUTReplaceSpecific "(^l)( {1,})", "\1"
CUTReplaceSpecific "( {1,})(^13)", "\2"
CUTReplaceSpecific "( {1,})(^l)", "\2"
Do
TextChar = InputBox("Type a single character of the next leading
character" _
& " that you want to remove. Click cancel to exit.")
If TextChar = "" Then
Exit Do
ElseIf InStr("*(){}[]!@?", TextChar) 0 Then
CUTReplaceSpecific "(^13)\" & TextChar & "{1,}", "\1"
CUTReplaceSpecific "(^l)\" & TextChar & "{1,}", "\1"
Else
CUTReplaceSpecific "(^13)" & TextChar & "{1,}", "\1"
CUTReplaceSpecific "(^l)" & TextChar & "{1,}", "\1"
End If
Loop While TextChar ""
End If
If MsgBox("Do you want to replace linebreaks with paragraph fromatting?",
vbYesNo) = vbYes Then
CUTReplaceSpecific "^l{2,}", "^p"
CUTReplaceSpecific "^l", " "
End If
If MsgBox("Do you want to delete empty paragraphs in this document?",
vbYesNo) = vbYes Then
For Each EP In ActiveDocument.Paragraphs
If Len(EP.Range.Text) = 1 Then EP.Range.Delete
Next EP
ElseIf bCutChars Then
ActiveDocument.Range(0, 0).Select
ActiveDocument.Paragraphs(1).Range.Delete
End If

End Sub



--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

vicb wrote:
Need to learn how to remove hard line breaks from a Word.doc to allow
text flow the entire witdth of page.

This document is 85 pages and can remove line by line but this would
take hours.

Thank you in advance for input and assistance.

VB



  #3   Report Post  
CyberTaz
 
Posts: n/a
Default

Use EditReplace & click [More], [Special] and insert the appropriate
character as your Find, type a space in the Replace field.

HTH |:)

"vicb" wrote:

Need to learn how to remove hard line breaks from a Word.doc to allow text
flow the entire witdth of page.

This document is 85 pages and can remove line by line but this would take
hours.

Thank you in advance for input and assistance.

VB

  #4   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

See http://word.mvps.org/FAQs/Formatting/CleanWebText.htm

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"vicb" wrote in message
...
Need to learn how to remove hard line breaks from a Word.doc to allow text
flow the entire witdth of page.

This document is 85 pages and can remove line by line but this would take
hours.

Thank you in advance for input and assistance.

VB


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and replace manual line breaks Orrie Microsoft Word Help 7 February 9th 05 07:40 AM
copying files from Wordperfect to Microsoft Word Juliet New Users 1 January 31st 05 05:41 PM
Boiletplates from Word Perfect linda Microsoft Word Help 1 January 28th 05 05:37 PM
macro in word js Microsoft Word Help 1 December 28th 04 03:01 AM
How do I convert a cd in word perfect to microsoft word greylady Microsoft Word Help 1 November 23rd 04 07:03 PM


All times are GMT +1. The time now is 08:21 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"