1 Reply Latest reply on Jun 29, 2009 1:13 AM by Bernd Alheit

    saveAs - Security settings prevent access to this property or method.

    eddiec00

      Hi,

       

      This question seems to have been dealt with in this forum on a few occasions but I am still have trouble with it:

      I have written a script to add a footer containing the file name to a PDF and then save the PDF:

       

      app.addMenuItem( { cName: "newdoc", cUser: "Add Footer", cParent:
      "File", cExec: "AddFooter()", nPos: 0 } );


      function AddFooter()
      {
      for (var p = 0; p < this.numPages; p++)

      {
      var fd = this.addField("Date", "text", p, [10,5, 300,28]);
      fd.textSize=10;
      fd.value = this.path  ;
      }

      var SaveFile = app.trustedFunction(function()
      {
        app.beginPriv();
       
        this.saveAs(this.path);
        app.endPriv();
      });
      }

       

       

      When I try to execute this script I receive an error:

      Security settings prevent access to this property or method.

       

      Any assistance would be much appreciated.

       

      eddiec :-)