Dear Group, I am trying to write a javascript for a button that emails the pdf to the email address on the form entered into a field named "emailother" I am new to scripting but I understand that to get the field data I need this.getField and field name but how do I insert that after the cTo:
this.mailDoc({
bUI: false,
cTo: "emailone [at] example [dot] com",
cCc: "", //???? what can I do to get the data from field "emailother" to appear here?
cSubject: "MOC Approval",
cMsg: "Please review, sign and forward this document to the next person in the approval workflow. Thank you."
});
Any Help Appreciated
var myField = this.getField("emailOther");
var cEMailURL = myField.value;
this.mailDoc({bUI:false, cTo: cEmailURL,...});
Of course, there are some problems here,
1. you need to make sure that the email address has the correct format.
2. the mailDoc function is restricted to use in either Acrobat Pro, or a "Save" enabled PDF in Reader.
3. In order to use "bUI:false", the script must be executed from a privileged context.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script