3 Replies Latest reply on Jun 9, 2008 10:02 AM by (Bruce_Oakley)

    Simple scripting question

      At least I think it is...

      What we are trying to do is fill fields in an InDesign CS3 document with data from Excel fields and a Word document. the end result will be a readme file that we can send out to a printer. It will contain for instance the Jobnumber that is in the briefing (.doc) and the specs (.xls). So a jobnumber, jobname, account connection from the briefing and color use, number of pages, fonts used from the specs file.

      Is this possible with scripting.. can I name a specific field from an .xls and place it in a specific textbox in InDesign. And pick a specific line in a .doc file and place it also in a specific text-box?

      And can anyone here point me in the right direction?
      We work only on Macs.
        • 1. Re: Simple scripting question
          sstanleyau Level 4
          On 4/6/08 7:21 PM, "mark hofhuis" <member@adobeforums.com> wrote:<br /><br />> can I name a specific field from an .xls and place it in a specific textbox in<br />> InDesign.<br /><br />You can use a reference to a particular cell or cells, or you can use some<br />kind of test to find it -- putting it into an InDesign document is then<br />easy. <br /><br />> And pick a specific line in a .doc file and place it also in a<br />> specific text-box?<br /><br />Sure.<br /><br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au>
          • 2. Re: Simple scripting question
            Level 1
            Is there anyone that can help me on my way.. point me to a site, or has a similar script that I can modify?
            • 3. Re: Simple scripting question
              Word and Excel both come with AppleScript Reference guides as PDFs, or the guides can be downloaded from MS support site if you don't have the install CDs. The guides have coding snippets that can show you the basics of talking to various parts of your source spreadsheet or documents, and there are sample scripts and forums all over.

              InDesign also has a scripting guide and example scripts as well. There are plenty of examples in this forum of ways to put captured data into particular places/elements/objects in an ID document, and how to label those places so that they can be recognized by scripts.

              The complexity of your script will depend on how you will recognize the data you need to move from doc and xls. For example, I have a simple script that reads a Word document that is a list of e-mail addresses and then finds each address in an Excel spreadsheet and turns on a highlight color in the matching cell. Sounds like you will be reading a Word file, then finding a job number to use as a pointer to several cells in Excel and migrating all the captured data to text blocks in InDesign. That's a bit more involved filtering and selection task than mine, so will require some patience and time to script.