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

populate the subject line in an email from a text field

Mapper
Registered: Oct 7 2008
Posts: 9

I have created a form in Adobe pro 8. My objective is to have a button included on the form that when clicked will initiate an email with the subject line auto filled from one of the text fields. I also do not want the adobe file attached in the email. This is solely used as a notification e-mail with the subject line populated. This is what I have so far. Thanks

this.mailDoc({

cTo: "",
var cSubject = this.getField("act number").value;
cMsg: "Please review this Action number in CAT. Thank You."
});

My Product Information:
Acrobat Pro 8.0, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Since you don't want to attach the document, you should use the app.mailMsg method instead, but it cannot be used in Reader. The documentation for this method in the Acrobat JavaScript reference has some sample code that's close to what you want to do, and your code above is on the right track.


George
Mapper
Registered: Oct 7 2008
Posts: 9
Thank you for your reply. I am new to this kind of scripting and I am not familiar with the app.mailMsg method. I did get everything to work except the removal of the document. Here is the script

var cSite = this.getField("Site").value;
var cMsg = "Action Number: " + cSite; // Text Concatonation
this.mailDoc ({
cTo:"",
cMsg: "Please review this Action number in Your Workflow. Thank You",
cSubject:cMsg,})
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
I'd suggest you get a copy of the Acrobat JavaScript reference: http://www.adobe.com/devnet/acrobat/javascript.php

This contains the documentation for the app.mailMsg method and a lot of other information that will help you in your Acrobat scripting endeavors.

You cannot use the mailDoc method if you don't want to include the document.

George
Mapper
Registered: Oct 7 2008
Posts: 9
Thanks for the pointers. I ended up using this script.

var cSite = this.getField("Site").value;
var cMsg = "Action Number: " + cSite; // Text Concatonation
app.mailMsg({bUI: false, cTo:"",
cMsg: "Please review this Action number in Your Workflow. Thank You",
cSubject:cMsg,})