Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Replace soft w/ hard line breaks (Word 2002 SP3)

    I have some multi-MB OCR'd documents that have been tweaked to look as close as possible to the printed originals, down to line breaks.... first by adjusting margins (so many breaks are soft with a trailing space), then by hand, so there are also plenty of manual breaks. Ditto for hyphens; some of Word's hyphenations matched the original, and some were forced..

    Now (you saw it coming) I'd like to make some changes in font size, margins, and paper layout -- which would reflow all the lines with soft breaks. Is there a macro, utility or other tool that would have the effect of locking every break (and ideally all hyphenation) the way it is now?

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Replace soft w/ hard line breaks (Word 2002 SP3)

    Hi Modavis,

    I don't know of any such utility but, in theory at least, if you increase the point size and make the corresponding changes to the the printable area, graphical objects, etc, the line breaks should remain where they are now.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Replace soft w/ hard line breaks (Word 2002 SP3)

    If you increase the point size then this may create some additional line breaks, I'm not sure how you could prevent this, other than by compensating changes to the margins.

    If you decrease the point size then you should be OK, your existing line breaks will remain.

    I'm not sure what you mean by "soft" line breaks, do you mean that word has split the line due to the margins, with no line break at all. If so then I am sure we could create a simple Macro that would replace each of these with a hard "new line" - would that help?

    StuartR

    Edited to add

    Here is a Macro that will add a soft line break at every point that Word has broken a line automatically.

    <code>
    Sub FixLineBreaks()

    Dim rngWord As Range
    Dim rngTemp As Range

    For Each rngWord In ActiveDocument.Words
    If rngWord.Information(wdFirstCharacterColumnNumber) = 1 Then
    Set rngTemp = rngWord
    rngTemp.Start = rngTemp.Start - 1
    Select Case rngTemp.Characters(1)
    Case vbCr, vbLf, vbVerticalTab

    Case Else
    rngTemp.Collapse Direction:=wdCollapseStart
    rngTemp.InsertAfter vbVerticalTab

    End Select
    End If
    Next rngWord
    End Sub
    </code>

  4. #4
    New Lounger
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Replace soft w/ hard line breaks (Word 2002 SP

    Thanks, Stuart (and macropod). The macro does what I need. (And next time I'll make all my decisions on paper, margin and point size first.)

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Replace soft w/ hard line breaks (Word 2002 SP

    Glad it worked for you, and welcome to the lounge!

    StuartR

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •