0 Replies Latest reply on Sep 20, 2015 6:50 AM by Colin Flashman

    Data Merge without using mergeRecords

    Colin Flashman Adobe Community Professional

      So far as I am aware, there are two commands that begin a data merge. These are:

       

      app.activeDocument.dataMergeProperties.mergeRecords(); 

       

      (for merging to InDesign files); and

       

      app.activeDocument.dataMergeProperties.exportFile()

       

      (for merging directly to PDF)

       

      But who says that I HAVE to use the dataMergeProperties features to export records to only these two file formats? What if I was able to loop through the records with the data merge preview on and export to other file formats using the exportFile function? I've made a script that loops through all records and can export one record at a time using the conventional dataMergeProperties.exportFile, but I can't find any way of controlling how to use the Data Merge preview to cycle through the records one by one to use a normal exportFile.

       

      I've had a look through InDesign ExtendScript API (10.0) and I can't find any controls for the Data Merge preview itself.

       

      Am I missing something, is this not possible, or is it possible but undocumented?

       

      Colin