6 Replies Latest reply on Jun 20, 2016 12:49 PM by try67

    Extract pages JavaScript code is not working when I assign a file name to the extracted pages.

    bryanmere88

      I have a pretty simple code going here:

       

      this.extractPages(35,37,"DISCLOSURES (PART 2) - BLANK AVID.pdf");

      this.deletePages(35,37);

       

      It's meant to extract a few pages from a document, automatically save them to the current working folder with the designated name, and then delete those pages from the original file. I've assigned this code to a button in the document. I swear, one minute it was working, and then it stopped. I've been at this for 8 hours straight so I may just be missing something so obvious but my tired eyes can't figure it out...I have other javascript buttons that involve changing fields to read-only and those are still working fine....any ideas anyone?

       

      I've tried changing the file name. When I remove the name, the code works fine:

      this.extractPages(35,37);

      this.deletePages(35,37);

       

      I'm using Acrobat Pro DC Version 2015.016.20045 on Windows 10 64bit.