2 Replies Latest reply on Jun 28, 2011 9:03 AM by Joe The Engineer

    opening another PDF at a certain page location

    Joe The Engineer

      I've got a button and I'm inserting the following code into it:

      ------------------------------------------------------------------------------------------ ----------------------------------------------------

       

      var cChoice = app.popUpMenuEx

      (

      {cName: "Main Menu", bMarked:true, bEnabled:false},

      {cName: "-"},

      {cName: "O&M Manuals", oSubMenu:

      [

          {cName: "AHU-1"},

          {cName: "AHU-2"}

      ]}

      )

       

      if (cChoice=="AHU-2")

      {

      var otherdoc = app.openDoc("AHU-2.pdf");

      otherdoc.pageNum = 1;

      }

       

      else if(cChoice=="AHU-1")

      {

      var otherdoc = app.openDoc("AHU-1.pdf");

      otherdoc.pageNum = 3;

      }

      ------------------------------------------------------------------------------------------ ----------------------------------------------------
      It works fine to open other documents in the same folder, but it never changes the pagenumber of the other document that it opens.  How can I make it change the page number to the page i'm trying to set with "pageNum"?  Yes, I'm very new to this...  I'm thinking it may not be possible for the javascript in one document to change the page number of another document.  If that's the case, can i open the document and then change the page number with a folder level script or something???  I am very new to this and examples would help alot.  Thank YOU for reading this.