Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and replace manual line breaks | Microsoft Word Help | |||
copying files from Wordperfect to Microsoft Word | New Users | |||
Boiletplates from Word Perfect | Microsoft Word Help | |||
macro in word | Microsoft Word Help | |||
How do I convert a cd in word perfect to microsoft word | Microsoft Word Help |