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

Possible Script Error?

Chris Lunt
Registered: Aug 22 2011
Posts: 17
Answered

Hi, just want to check my syntax here. I have an ok button which, if a checkbox is ticked, will attach the PDF to a new email.
I want the address to be blank so the sender has to write in whoever they're sending it too, but I also want it to bcc in a general address.
 
It all seems to work okay in practise, but when I bcc an email address that doesn't have Adobe Acrobat (only Adobe Reader), it throws up an error message when they try and open the PDF.
 
Is it possible this is because of this script, or, am I going to have to dig deeper...?
  
if(this.getField("OrderConfirmation").isBoxChecked(0))
this.submitForm("mailto:?"
 
+ "&subject=Order Form"
 
+ "&bcc=sales [at] sales [dot] com"
 
+ "&body=Please find my order form attached"
);
else
app.alert("You must accept the terms and conditions before submitting");
  
nb using Adobe Pro X

My Product Information:
Acrobat Pro 10.0, Windows
Chris Lunt
Registered: Aug 22 2011
Posts: 17
Also this is the error message that I'm getting if I try and open with Adobe Reader (on a PC without Acrobat installed):

The file you are attempting to open contains comments or form data that are supposed to be placed on . This document cannot be found. It may have been moved, or deleted. Would you like to attempt to locate this document?

Now, I've been able to open it without any queries until some recent tinkering, which is why I think the above script may be the culprit!

Edit - having done a search on that error I've discovered it's sending the file as an FDF - I don't know what this is or why, it's intended to be a PDF, so I must have done something to cause the file format to change to FDF somehow...
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Accepted Answer
Use this.mailDoc(), not this.submitForm().

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

Chris Lunt
Registered: Aug 22 2011
Posts: 17
so simple, thanks!