


Any way to add custom file name to app.execMenuItem("SaveAs");? When it saves, it does exactly what I'm needing - open windows explorer so users can drill down to the proper destination, which will be varied. However, am having trouble finding how to name the file based on 3 pieces of form data.
Example:
ContractNo_ProjectNo_ChangeNo.pdf
Any assistance appreciated, thank you!
Views
Replies
Sign in to like this content
Total Likes
Hi,
here's an example you might find useful.
http://thelivecycle.blogspot.de/2009/11/save-form-to-specific-directories-and.html
Thank you, it was helpful and very detailed. I did download and review the files, but unfortunately am not knowledgable enough to implement it, and it mentions saving to specific directories. I didn't know how to modify to open the windows explorer dialog box with the filename prefilled from 3 form fields instead of specific directory, as it will vary quite a bit.
Also it seemed to need a file placed in javascript folder. I won't be able to do that, so this may not be an option for me, after all, and I may just need to leave it at app.execMenuItem("SaveAs");.
Lots to learn . . .
Thank you!
Views
Replies
Sign in to like this content
Total Likes
I am using ES4 version 11
I read your article and entered the following script statement it in a button :
DSCRReport.Page_1_DSCReport.Button3::click - (JavaScript, client)
var LCB_SaveAs = app.trustedFunction(function(doc)
{
app.beginPriv();
var LCB_SaveAsTarget = SaveAsTarget;
doc.saveAs(LCB_SaveAsTarget);
app.endPriv();
});
Nothing happen when I attempt to activate the process and the console give me the following error message"
NotAllowedError: Security settings prevent access to this property or method.
App.trustedFunction:2:XFA:DSCRReport[0]:Page_1_DSCReport[0]:Button3[0]:click
I understood that this script was the work around to the security restriction. Is there something else that I should be doing. Or has it been made impossible to do.
I was hoping to use your recommended script to automate the format of the file name upon saving.
Thanks
Views
Replies
Sign in to like this content
Total Likes
Di you test this with Acrobat or just in Designer's PDF-Preview?
Views
Replies
Sign in to like this content
Total Likes
I had only tested with the Designer's PDF-Preview . Further to your question I went back and tested with Acrobat XI pro and Acrobat Pro DC latest version with the same result.
Views
Replies
Sign in to like this content
Total Likes
I were not able to reproduce you problem at my end - the solution works in Designer's PDF-Preview and Acrobat for me.
You may check out my updated version.
Views
Replies
Sign in to like this content
Total Likes