1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Editing Carriage Return Characters in a Word 2007 Document

Discussion in 'Business Applications' started by laneseda, Sep 8, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. laneseda

    laneseda Thread Starter

    Joined:
    Mar 22, 2006
    Messages:
    183
    Hello,

    My system:
    MS Windows XP Home fully updated
    MS Office 2007 fully updated

    The issue:
    I have been sent a very large Word file. Unfortunately, every line of text in the file is terminated with a "print" (^P) character, and every paragraph ends with two such characters. As an example, a paragraph of text would look like this:
    Terrorism works, to a large extent, because(^P)
    terrorists use the media to(^P)
    ensure their cause receives the publicity they desire.(^P)
    (^P)​

    The question:
    How do I go about removing all the carriage return (^P) characters at the end of every line while retaining the same character (the second ^P) to keep the paragraphs apart?

    All suggestions will be gratefully received.

    Thanks in advance.
    Lane
     
  2. jimr381

    jimr381

    Joined:
    Jul 20, 2007
    Messages:
    4,175
    Here is what I would do. I would find all of the Carriage returns and replace them with line breaks, then I would follow that up by finding all the double line breaks and replacing them with a single carriage return.
     
  3. laneseda

    laneseda Thread Starter

    Joined:
    Mar 22, 2006
    Messages:
    183
    Thank you, jimr381, for taking the time to reply to my query. I'll do as you suggest. I may have to do this in stages as the file in question is very large, approximately 16 MB.

    Regards,
    Lane
     
  4. Noyb

    Noyb Trusted Advisor

    Joined:
    May 25, 2005
    Messages:
    19,742
    Can't you do a replace using special characters ..
    and replace all doubles with a single ..
     

    Attached Files:

  5. jimr381

    jimr381

    Joined:
    Jul 20, 2007
    Messages:
    4,175
    Aye Noyb he can, but I think he also wants to get rid of the paragraph markers between the line items and replace them with soft returns.
     
  6. CarolinaBill

    CarolinaBill

    Joined:
    Jan 1, 2006
    Messages:
    165
    I do this from time to time in Word Perfect but the principal applies equally here. You have to Find and Replace in steps.
    1. Replace all occurrences of a double line break or hard return with some arbitrary symbol (or symbols) that is not likely to be in the text, for example, "!" This isolates and removes the paragraph identification.
    2. Replace all occurrences of a single hard return with a space plus soft return, or line break, or whatever you choose. This takes care of all the lines within a paragraph.
    3. Replace all of your special symbols with a double hard return. This restores the paragraph structure.
    By Replacing All, you can very rapidly go through a large document. Then there will probably need to be some manual adjustment of exceptions after that.
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/748008