I've created a basic form in which the user will be sending the PDF, based off some code I found here on the forum (see below for code). The code works great, just one confusing aspect on my part. If I test in LiveCycle, the PDF will attach to email, but it will create a unique filename for the PDF. After I publish and test in Adobe Reader, it will send the attachment using the name of the original form file name. Any thoughts? I would like to keep the unique naming format.
Thanks in advance for any tips or advice:
Here is code:
//Variables to be used in the mail context
var WhoIsIt = subfrm_Main.Whom.rawValue
var WhoSentIt = subfrm_Main.SubmittedBy.rawValue
var myDoc = event.target;
var address = "emailaddress [at] something [dot] com";
var subject = "Subject Text " + WhoIsIt + " from " + WhoSentIt;
var msgBody = "More Free Text for Message Body " + subject
//Send mail action
myDoc.mailDoc({
bUI: false,
cTo: address,
cSubject: subject,
cMsg: msgBody,
cSubmitAs: "PDF"
});
There is no way to manipulate the file name in Acrobat/Reader later.
The form will always have its original name in the e-mails.
You only can save it manually first with a name of your choice, then reopen it and use your mail button.
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs