These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Email Button

30011754
Registered: Jan 6 2010
Posts: 13

I have the following button script in one of my forms. When the button is executed it attaches the filled pdf file in a email.

Is there a way I can add an additional line of script code in my existing script that will name the file how I want it. (Example)--> John Dowe 05272010, The John Dowe would be picked off from the form and the date would be picked of from the PC's system. Im working with Adobe Acrobat Pro 9.

{
// This is the form return email, It’s hardcoded
// so that the form is always returned to the same address
// Change address on your form
var cToAddr = "us [dot] pb [dot] client [dot] complaints [at] global [dot] com";

// Set the subject line
var cSubLine = "Data from Copy of Verbal Complaint Form - Interactive";

// Send the form data as an PDF attachment on an email
this.mailDoc({bUI: true, cTo: cToAddr, cSubject: cSubLine});
}

My Product Information:
Acrobat Pro 9.3.1, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2398
You can use saveAs to save the file prior to sending it. However, this function has security restrictions so you will need to create a folder-level script and call it from the button's script.
Search the forums, this has been discussed before here.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com