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:
This woudl be on the click event of the button of course.
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.
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?
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.
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.
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.
How can I change the xml code to Save to desktop and not to my documents? I have an user asking for this option 🙂