I love this flexibility when assigning a click event to a generic button.
var myDoc = event.target;
var address = DropDownList2.rawValue;
var sub = "Returned form Policy Manager Request";
var msgBody = "Hello,\n\Thanks for requesting a Policy Manager Form.\nThanks\n\nKind regards\n";
myDoc.mailDoc({
bUI: false,
cTo: address,
cSubject: sub,
cMsg: msgBody,
cSubmitAs: "PDF"
});
BUT, I don't know how to get this code to not be bound to a dropdown list selection - I would like it to leave the To: blank for the user to fill in once it opens in Outlook - like I can do if I use a button and assign it the submit function, and then just drop in mailto:? in the Submit tab.
Can I get kind of a hybrid of the two, so to speak? Use the code above in a click event on a button, but have it not involve a dropdown choice, leaving the To: field blank in the email?
Just set "bUI" to true and do not include "cTo". If you want the inclusion of cTo to be dependant on a selection you can create the parameter object separately like this:
Here's an article on method for doing exactly the same thing using the built-in Button Submit
http://www.acrobatusers.com/tutorials/modifying-livecycle-designer-form-submit-button
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]
Actually, there is another way.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script