none
Macro to delete CRLF and PGH in document RRS feed

  • Question

  • I am working on a project where we are taking a Family cookbook written in the 80's, scanning it, and then publishing it digitally back for the family. I am scanning it as an RTF, then converting it into Word, where I will then manipulate it and update it. Problem is, sometimes the scan results in a CF/LF, and sometimes it results in a new PGH at the end of the line.

    I know how to write macros in Excel, but am somewhat stumped on how to search for and replace a CR/LF and replace it with a PGH command.  This is important as I need to get the formatting (in this case, bullets) properly placed on the page.

    I have never written a macro in Word, and this is a task that will require automation as I have about 200 recipes to edit and format.  Any help here would be appreciated.

    Tuesday, August 25, 2015 2:26 AM

Answers

  • You can use Find/Replace to look for paragraph breaks, where;

    Find = ^p
    or:
    Find = ^13

    You can use Find/Replace to look for manual line breaks, where;

    Find = ^l
    or:
    Find = ^11

    However, I don't know what you mean by a "new PGH command". If you mean a manual page break or Section break, you can find those with:

    Find = ^12

    You don't need a macro for any of this and, even if you used one, you probably wouldn't want it to blindly delete all line/paragraph/page/Section breaks.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    • Marked as answer by BillZens Wednesday, August 26, 2015 7:38 PM
    Tuesday, August 25, 2015 3:39 AM