5 Replies Latest reply on Aug 12, 2014 9:26 PM by Jo_2013

    Import Text Data to text fields with folder level script

    Jo_2013 Level 1

      I am using Adobe 9 professional and have a folder level javascript to import text into existing fields of a pdf.


      There are multiple fields with multiple rows of data to be imported.


      The folder level script is not working (but there are no errors in the console showing when run)


      I have manually tested opening the text file with the following code in the console and the text file opens and populates the text fields, so the text file must be correct:





      The following code is the folder level script which is not working:


      function mailmergeFunction()


      // Import the first row of data from "Mailmerge.txt"

      this.importTextData("/h/mail merge/Jo Smith's Things/Mailmerge.txt", 0)

      if (typeof cnt == "undefined") cnt = 0;
      this.importTextData("/h/mail merge/Jo Smith's Things/Mailmerge.txt", cnt++ % 4)



      app.addToolButton({cName: "Mail merge",cExec: "mailmergeFunction()",cTooltext: "Mail Merge",cEnable: true,nPos: 14});


      If anyone can please provide some assistance, it will be most appreciated thanks.