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

Stopping the close when user cancels saving, and more...

clueless1942
Registered: Jun 14 2010
Posts: 23
Answered

Hi, I've got some fillable forms made with Livecycle Designer ES2 , and I've made a button for 'save and close' with a simple:

app.execMenuItem("SaveAs");
app.execMenuItem("Close");

It works perfectly, but when the user cancels the saving, the pdf still closes itself. Is there a way to avoid the closing when the document has not been saved yet?

And finally, one last question: how can I set a default save name (taking, for instance, date and time from the computer) to avoid accidental overwriting of a previous save? I've been reading some threads but many of them (as far as I understood) request installing files in the client computer (it can't be done, in my case).

Thank you!!!

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Put the script "app.execMenuItem("Close");" into the postSave event.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

clueless1942
Registered: Jun 14 2010
Posts: 23
Thank you so much, radzmar!!!

I don't know how could I be so blind, it was such a stupid mistake!

By the way, I have to assume there's no solution to my other question, is there? I can't avoid using Folder level scripts to set a default save name?

(http://thelivecycle.blogspot.com/2009/11/save-form-to-specific-directories-and.php)