Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

SaveAs and mail

Avatar

Former Community Member
Hi.



I'm a new user of LiveCycle and I have some questions.

I have created a form and would like to add a button performing the following tasks:



1. Save the filled pdf form to a specific location in our LAN, with a filename built up of a value in one of the form fields.



2. Send an e-mail to a number of colleagues, to notify them about the saved pdf-form.



I have searched a while among topics in this forum, but haven't found a solution. We're using Groupwise as e-mail-system.



Any ideas?



/Magnus
8 Replies

Avatar

Former Community Member
Saving the PDF form to a specified location will be a problem. For security reasons you cannot just save a file. You can use the command app.execMenuItem("SaveAs") to invoke the save as dialog box, then the user can choose where the file should go. In this way the user is aware that the PDF is being saved.



Mailing the file to your colleagues is not an issue as you can use a regular submit button and use the mailto protocol to control who will recieve th eemail. I would make this button invisible.



All of this can be done from a single button click that the user would use to indicate when they are ready to save and send. The button would have the previously mentioned code as the 1st line and the second line would be:

the_name_of_the_emailbutton.execevent("click")



This woudl be on the click event of the button of course.

Avatar

Former Community Member
Thanks for your reply.

Regarding the mailing, we're using Groupwise as mail-system, but the "mailto:" -function insists to start the outlook client.

I would also like to send the mail immediately when clicking my form button. Subject specified in the form-button properties is enough for me, but perhaps it's possible to specify message text aswell, by scripting...



Another question: Is it possible to create a button that activates a file browser? I want the form filler to specify a LAN-path, without having to write it manually. When a path is selected, it should be displayed in a specific text field.



/Magnus

Avatar

Former Community Member
An addition to my last reply:



I understand the security issues concerning document saving, but is it possible to specify a path (and perhaps propose a filename) that has to be confirmed by the user?

Avatar

Former Community Member
The mailto functionality will connect to the default mail client on your machine. Sounds like outlook is the default. Can you make Groupwise the default client? The mailto also gives you the ability to adjust all parts of the email(reciever, subject, body etc...)



I do not know of a way to suggest a filepath or filename ....the activation of the saveas dialog will open where the original file was loaded from.

Avatar

Former Community Member
OK.



I chose to use an ordinary Submit-button (added a app.execMenuItem("SaveAs"); to the button.



When trying it, I get the message that the file is saved and successfully sent. But no mail appears in my mailbox. I've checked address spelling and that Groupwise is the default mail client.

What else could go wrong?



/Magnus

Avatar

Former Community Member
Do you have a virus scan software loaded....it will block programmatic sending of the email sometimes. Also if you go into a browser and type in the mailto command and see if that email gets sent. This will tell us if it is an Acrobat problem or a permissions problem on your OS.

Avatar

Former Community Member
How can I change the xml code to Save to desktop and not to my documents? I have an user asking for this option :)



Avatar

Former Community Member
That is the default folder location for that app ...you cannot change it as far as I know.