3 Replies Latest reply on Mar 28, 2013 8:45 AM by SeanBonney

    Auto-incrementing field?

    SeanBonney

      I am designing a publication which refers to numbers on a Reader Service Card and am looking for a technique to have these numbers auto-increment.

       

      Throughout the document, a Text Frame appears that reads "Circle# 10 on the Reader Service Card." This may appear multiple times on a single page, or not at all. I need for the 10 to start at 1 and increment each time we get to it in order.

       

      I have read several helpful posts relating to similar issues. I could certainly use multiple Text Frames, one with "Circle# on the Reader Service Card." and a smaller one for the number. Thread the smaller ones together and fill them with:

      "1

      2

      3

      4

      5

      6

      ..."

      This would work, but I would have to re-thread each time the ads are reordered. And I would have to change the spacing on the bottom Text Frame at the point that we go from single-digit to double-digit numbers.

       

      I also investigated Data Merge, but it seems better suited for single-page documents in which the only thing that changes are the content records. Using the same data source from above, I don't see a way to insert the field throughout a multi-page document and have it go to the next record each time it is encountered.

       

      I am using CS5. Any suggestions would be appreciated. Thanks.

        • 1. Re: Auto-incrementing field?
          SeanBonney Level 1

          I have made some progress by using a script, as suggested: http://forums.adobe.com/message/2366871.

           

          count = 0;

          str = "";

          while (count < 100)

          {

          count++;

          str += "Circle #"+count+" on reader service card."+"\r";

          }

          app.selection[0].contents = str;

           

          This script will insert the proper text lines into the selected Text Frame. The subsequent ones still have be manually threaded, but at least each is in a single Text Frame and I don't have to worry about spacing. If numbers change I can go to the first one and re-run the script.

           

          Now if there were some way to dynamically thread Text Frames...

          • 2. Re: Auto-incrementing field?
            SeanBonney Level 1

            Nevermind. Paragraph numbering is easier, keeps track if I add or remove Text Frames, the only thing it doesn't do is let me control how they are numbered on a page. Numbering seems to start with first-created.

            • 3. Re: Auto-incrementing field?
              SeanBonney Level 1

              Now for my next challenge - inserting incrementing numbers elsewhere. Paragraph numbering works fine at the beginning of a line, but what if I need it at the end of a line? Each paragraph will contain different text, but I would like for each to end with an incrementing number.