I have a PDF form and would like to have the users click a Submit Button and Java Script behind the button would save the filled out form as a pdf, kick off a vbScript that will email the form to a client using smtp, and then exit Acrobat Pro or Reader which ever they are using. Can this be done?
Thank You,
Ken Marvin
You cannot run a VB Script, or any other program from JavaScript in a PDF. There are exceptions, but they are for well know programs, like an email client.
For example, you can use the mailFrom and submitForm JavaScript functions to email the current PDF, so there shouldn't be any need for an external proprogram.
Closing Acrobat is also a problem and there are variations on these points in the different versions of Acrobat.
You are better off using the IAC interface (Inter-Application Communication) to control Acrobat from a VB program. It will allow you to do all the things you want. The documentation is here.
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Click on the documentation tab.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script