4 Replies Latest reply on Oct 5, 2012 8:55 PM by GeofferyH

    Help cleaning up a Word file

    GeofferyH Level 1

      Ok, so I have a company directory that I work on every year and the first twenty or so pages are given to me in a Word file.

       

      I am trying to convert the Word bits into corresponding styles that I have set up in ID but am doing it manually and is taking far longer than it probably should — I am wondering if it would be faster as a Find/Change/GREP type of thing.

       

      For instance;

       

      The Word file has single column that goes like:
      Firstname Lastname.....Dept.....Number (phone). yes, there is a dot leader between the entries.

       

      Other formatting from the Word file is 2 column, like:
      Firstname Lastname.....Number          Firstname  Lastname.....Number

       

      It has 3 and 4 column iterations as well

       

      Is there a way to say: "Find Lastname — Tab — Department — Number" and apply the single column style...

       

      and for the 2 column:  "Find Firstname Lastname — Tab — Dept — Tab — Find Firstname Lastname — Tab and apply the 2 column style and so on.

       

      (There is a space between Firstname and Lastname.)

       

      Is this doable? Appreciate any tips for the best way(s) to approach this.

       

      Geoff.

        • 1. Re: Help cleaning up a Word file
          luis_mendes Level 1

          Hi Geoff,

           

          You should look at using a Find/Change Grep, or implementing a GREP style. Which version of ID are you using?

           

          Luis

          • 2. Re: Help cleaning up a Word file
            GeofferyH Level 1

            ID CS5 7.0.4.

             

            I played with GREP a little with no luck, not very savvy with scripting.

             

            Can you get me started?

             

            TIA

             

            Geoff

            • 3. Re: Help cleaning up a Word file
              Colin Flashman Adobe Community Professional

              InDesign ships with a script called FindChangeByList.jsx which references a text file which instructs the script what find/change commands to make. This is great for cleaning up word files which have more than one issue, such as double spaces, double returns, space then comma etc.

               

              The text file can be copied and then changed for your own purposes. I use such a solution to format 1800pp of text supplied to me in "old-school" wordperfect code to become formatted text ready for press.

               

              in terms of finding the data separated by either

               

              • many full stops;
              • a tab; or
              • many spaces

               

              use this GREP in the find field:

              (\.{3,}|\t|\s{3,})

               

              and replace with

               

              \t

               

              in the replace field. it is possible to assign a paragraph style by hitting the magnifying type icon to the right of the "Change Format" box at the bottom of the dialog box.

               

              Cari Jansen (www.carijansen.com) has speaker notes from a GREP presentation she gave a while ago. look for the file "Speakernotes_GREP" on her website. GREP is worth the time to learn, especially as it not only can be used for find/replace, but it can format on the fly with GREP styles.

               

              colly

              • 4. Re: Help cleaning up a Word file
                GeofferyH Level 1

                Thanks Colly, will give it a try.