• Strip out spaces (2002 SP 2)

    Author
    Topic
    #392299

    I’m laying out a book in Adobe PageMaker 6.5. The author submits the text in WordPerfect format, which I convert to Word format. I use Word to edit the material, then place it in PageMaker. The author tends to use his word processing program as if it were a typewriter, e.g., hitting enter at the end of each line as if it were a carriage return, putting in extra spaces before lines instead of indenting or setting larger margins for material he wants to isolate on the page, such as long quotes. It drives me nuts trying to strip all these things out by hand, but to remove all extraneous paragraph marks and white space with find/replace throws the baby out with the bath water and makes it even harder to get the text into shape for plaement in PM. Is there a middle course, some means of removing these extra spaces and paragraph marks without removing the spaces between words? Saving the Word doc as text doesn’t strip this stuff out, btw.
    Clark

    Viewing 0 reply threads
    Author
    Replies
    • #703781

      Hi Clark:
      First, to strip out white spaces at the beginning of lines:
      Method 1:
      1. Select the entire document (Ctrl+A).
      2. Hold down the Ctrl key & press EL. This centers everything & then left justifies it. While I don’t have Word 2002 to test, up through Word 2000, Word uses a Word Basic command for this & the effect is to strip out the white space at the beginning of each paragraph.

      Method 2: Find/Replace
      Without using Wildcards, this will work for all but the first line in the document. You’re finding a paragraph mark followed by white space, & replacing with a paragraph.
      Find: ^p^w
      Replace: ^p

      To remove paragraph marks, there’s a two step process using Find/Replace:
      Without wildcards,
      1. Find: ^p^p
      Replace: %%% You can actually use any combination that isn’t otherwise used in your document. I find that a triple % works well. This finds all double paragraph marks, which is what you have at the end of each real paragraph.
      2. Find: ^p
      Replace: leave blank & do replace all. This removes the paragraph marks at the end of each line.
      3. Find: %%%
      Replace: ^p This replaces the paragraph marks that belong at the end of each paragraph.

      You can actually record each of these steps using the macro recorder & then use it to reformat your document. If you do, you must make two changes:
      For wdAlignParagraphLeft & wdAlignParagraphCenter, you must change to either LeftPara or LeftPara() and CenterPara or CenterPara(). I would make one other change. You will have a line in your macro that says:
      .Wrap = wdFindContinue

      I would change this to .Wrap = wdFindStop so that you can apply it to selected text, rather than the whole document.
      Hope this helps,

      • #703797

        Thanks. I tried this and it worked pretty well. It left some words run together and it left some larger than usual spaces between words. I’m not sure where that comes from. There will be a single space between two words, which looks like two or more spaces. If I delete it and hit the space bar, then a normal space is inserted.
        Clark

        • #703816

          If you show hidden characters (the show/hide button on the standard toolbar), does anything show besides the single space. I don’t know what kind of formatting is in your document, perhaps starting by selecting everything & pressing Ctrl+Spacebar & Ctrl+Q to remove all direct formatting would help. Otherwise, if you want to post a portion of the document containing the remaining problem, someone can take a look at it.
          Cheers,

          • #703990

            Your suggestion to show hidden characters turned out to be very helpful. It proved that even something this chaotic has some order to it, in this case I was dealing mostly with multiples of five spaces and lots of tabs. A couple of find/replaces and I had the document all cleaned up. Thanks for your help.
            Clark

    Viewing 0 reply threads
    Reply To: Strip out spaces (2002 SP 2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: