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

using javascript to populate an email from a PDF. wondering about rich text

sol.manager
Registered: Oct 1 2009
Posts: 17
Answered

I have a javascript that takes information from form fields and inserts them into the body of an email message. Everything works, except one thing. One of the text fields in the form allows (RTF) "rich text". I cannot seem to find how to insert the text into the email with the RFT formatting intact.
Wondering if this gets into creating an HTML email from the script. Any ideas would be appreciated.
 
Here is the relevant section of the script:
////////////////
// Email()
//
// Function to email the form and format the subject line
// the subject line is used by mail filter to route to the correct PM
//
function Email()
{
var atype = this.getField("request")
var metro = this.getField("metro")
var advert = this.getField("advertiser")
var size = this.getField("size")
var color = this.getField("color")
var notes = this.getField("notes")
var msgBody = atype.value + "\n\n" + "Advertiser: " + advert.value + "\n\n" + "Market: " + metro.value + "\n\n" + "Size: " + size.value + "\n\n" + "Color: " + color.value + "\n\n" + "Notes: " + notes.value + "\n\n" + "Ad Copy: " + this.getField("adcopy").value
this.mailDoc({
bUI: false,
cTo: "joe [at] sample [dot] com",
// cCC: "bill [at] sample [dot] com",
cSubject: metro.value + advert.value,
cMsg: msgBody,
});

My Product Information:
Acrobat Pro 9.4, Macintosh
sol.manager
Registered: Oct 1 2009
Posts: 17
Oh yeah, the RTF field is the one named "Ad Copy" -sorry.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Accepted Answer
Acrobat is only able to create plain-text emails, it seems.

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

sol.manager
Registered: Oct 1 2009
Posts: 17
try67 wrote:
Acrobat is only able to create plain-text emails, it seems.
As i feared. So close but so far. I know that if i copy and paste the information all of the formatting is intact. Too bad the javascript can't be a bit smarter.
Thank you.