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

An ampersand (&) special character can not populate in to body email

hoangta8
Registered: Nov 28 2007
Posts: 8
Answered

I hope someone would be able to help:

The (&) character can't be forced into body of the email whenever the Comment2 field has this chracter input. For instance:

example 1:

Input: Long day & Night
output to body email : Long day

example 2:

input: long day and Night
output to body email: long day and Night

Here is the code:

var Comment = this.getField("CarNo").value;
var Comment1= this.getField("PartName").valueAsString;
var Comment2 = this.getField("DescriptionCondition").valueAsString;
var Comment3 = this.getField("From").value;

this.submitForm({cURL:"mailto: "+this.getField("EmailRecip").value
+"?subject=C.A.R Requested by "+Comment3
+"&body= C A R Number: "+Comment+"\r Part Name: "+Comment1+"\r Description of Condition: "+Comment2+"",cSubmitAs:"PDF",cCharset:"utf-8"});

your help is much appreciated.

HT

My Product Information:
Acrobat Pro 8.0, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1875
The mailDoc method will be better for this.

George
hoangta8
Registered: Nov 28 2007
Posts: 8
George_Johnson wrote:
The mailDoc method will be better for this.George
George!

I tried the mailDoc method and it worked like a champ!!!!

here is the revision:

this.mailDoc({
bUI: false,
cTo:this.getField("EmailRecip").value,
cSubject: "C.A.R Requested by"+Comment3,

cMsg: "C A R Number:" + Comment + "\rPart Name:" + Comment1 + "\rDescription of Condition: " +Comment2,
});

Great suggestion George and Thanks again

HT