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

    cut/paste text riddled with line breaks (Word 2002 part of Office XP professional Suite (Retail))

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    Hi

    I'm using Word as part of my Office XP professional suite, retail box, and right now I'm facing a problem with a peculiar type of text. I download most of my philosophy books from this address http://philosophy.eserver.org , try for example, Immanuel Kant's "Prolegomenna to Any Future Metaphysics", you'll find that you will be presented with a .txt document, almost a notepad. In order to improve the presentation of the text, I simply copy and past the whole ".txt" webpage into an empty word document. After I do that, I click the "show/hide non-printing marks" and I find that at the end of each line there's a paragraph break, a pilcrow, rather than a bent arrow, the sign of a line break.

    I have tried everything, from autoformat, which did nothing to the pasted text, except maybe applying a new 'head style' to it, while the line retained their short form which wrapped before the end of the line. Can someone tell me how to get rid of these pilcrow line breaks? Please if someone can try the text from the above URL, and see for him/herself the wrapped line which are cut "short" before they reach the line's end.

    p.s. I'm running my professional office xp suite on a windows xp home edition, 3.2 GHz, Petium 4, 1GB 3200 DDRAM Kingstone pc system.

    Can someone please help me with this problem?

    All I need to do is to get rid of the pilcrow markers, and making lines wrap up to their ends in a justifiable and neat way.

    regards
    ashraf kadry

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: cut/paste text riddled with line breaks (Word 2002 part of Office XP p

    Welcome to Woody's Lounge!

    You can edit the document as follows:

    - Select Edit | Replace.
    - Type <code>^p^p</code> in the Find what box, and @@@@ or something equally improbable in the Replace with box.
    - Click Replace All.
    - Change the contents of the Find what box to a single <code>^p</code> and that of the Replace with box to a single space.
    - Click Replace All.
    - Change the contents of the Find what box to @@@@ (or whatever you chose) and that of the Replace with box to <code>^p^p</code>
    - Click Replace All.

    (<code>^p</code> is the code for a paragraph end, and @@@@ is just a placeholder)

    If you need to do this often, you could record a macro that performs these actions.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: cut/paste text riddled with line breaks (Word 2002 part of Office XP p

    Here is a macro that will "fix" the document:
    <code>
    Sub FixLinebreaks()
    Application.ScreenUpdating = False
    With ActiveDocument.Content.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .MatchWholeWord = False
    .MatchWildcards = False
    .Execute FindText:="^p^p", ReplaceWith:="@@@@", _
    Replace:=wdReplaceAll
    .Execute FindText:="^p", ReplaceWith:=" ", _
    Replace:=wdReplaceAll
    .Execute FindText:="@@@@", ReplaceWith:="^p^p", _
    Replace:=wdReplaceAll
    End With
    Application.ScreenUpdating = True
    End Sub
    </code>
    If you put it in a module in your Normal.dot, it'll be available in all documents.

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

    Re: cut/paste text riddled with line breaks (Word 2002 part of Office XP p

    Thank you Hans for Welcoming me and replying to my post, I'm truly thankful and grateful for the

Posting Permissions

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