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

Unique file name

stonesrock
Registered: Feb 27 2007
Posts: 54
Answered

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"
});

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
The name you see from the LiveCycle preview is a name of a temporary pdf-file, that is generate only for the current preview (i.e. ~9875456456.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

stonesrock
Registered: Feb 27 2007
Posts: 54
Thanks radzmar, I appreiciate the clarification!