2 Replies Latest reply on Oct 2, 2008 6:25 AM by (Beth_Schweitzer)

    How to loop through data merge in script?

      I am new to scripting in InDesign, but have been writing VB for a long time and am hoping to to the following via a script where no user intervention is required:

      1) Open InDesign with a document that contains data merge fields and a basic layout.

      2) Loop through each record in the data, one at a time.

      3) For each record, build an InDesign document that consists of snippets placed sequentially, based on information in the data.

      4) Create a pdf from the document.

      5) Close or clean out the document and loop back for the next one.

      First of all, is this possible? If so, can someone point me to resources that will tell me how to do these things? For example, how to loop through the records in the data source. Is there a comprehensive reference for scripting in InDesign somewhere?

      I read the online scripting guide for VBscript but that is not a reference, only gives some examples of how to do things. The help that comes with InDesign has even less information.

      Thanks for any and all help,
      Beth