5 Replies Latest reply on Jun 4, 2012 4:50 PM by Rmadrid9

    How to create a bookmark with action to open a file


      Hi all,


      I'm a newbie in javascripting for Adobe Acrobat (I'm running on Acrobat Professional 8) so please don't kill me for my question.


      I want to run a batch sequence to create a bookmark which opens a specific file in lots of pdf files. The way I'm following is:


      1. To create a batch sequence to run a javascript on selected pdf files.

      2. I've tried several ways of writing the script:



      var myRoot = this.bookmarkRoot;


      var Index = myRoot.children[0];

      Index.setAction("app.openDoc('/relative path to the file.pdf');");




      var myRoot = this.bookmarkRoot;

      myRoot.createChild("Index", "app.openDoc('/relative path to the file.pdf');");


      In both cases I'm getting errors in JavaScript Debugger. First of all, I see:


      NotAllowedError: Security settings prevent access to this property or method.

      app.openDoc:1:Bookmark undefined:Mouse Up.


      Please advise what I'm doing wrong and what is the easiest way to create a such bookmark which opens a simple pdf file which stored in the same directory where all files are.