1 Reply Latest reply on Aug 19, 2013 7:02 AM by George_Johnson

    Save & Send PDF Form

    Vincent van Dun

      Hi all,


      I'm trying to program a function in my PDF form that will automaticly save the PDF form in a folder and then sends the (just saved) PDF form attached in an e-mail.


      I've got the mail function working with my submit button. The only question is how can i get my PDF form to first save and then send the form?

      I've treid several saving scripts but couldn't get it working.


      Could you guys help me out?


      Kind Regards,




      Below my code:


      // Set up the recipients,subject, body, etc.

      var sTo = this.getField("Unit").value;

      var sBCC = "info@test.nl";

      var sSubject = "Nice subject";

      var sBody = "Bla bla bla";



      // Set the error messge to display if it doesn't work, \r = carriage return

      var sErrorMsg = "Could not send email. Please make sure your email client is set up correctly.\r\r";

      sErrorMsg += "Otherwise, save this file and manually attach it to an email to: " + sTo +" info@test.nl";



      // Email the entire document

      try {


          bUI: true,

          cTo: sTo,

          cBcc: sBCC,

          cSubject: sSubject,

          cMsg: sBody


      } catch(e) {

          app.alert(sErrorMsg, 1);