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

Print Button to include email

wdrspens
Registered: Jul 22 2008
Posts: 94
Answered

Using LiveCycle Designer ES (8.2.1...) there are two very useful pre-coded Print and Reset Buttons.
However I would like to email all the data immediately prior to Printing or Resetting.
What code do I add in between the following two lines on the Print Button to ensure that the data is emailed?
Code:
form1.MainContent.PrintButton1::click - (JavaScript, client)

xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 0, 0, 0, 0);

I assume it is the same code that I add between the following two lines on the Reset Button:
Code:
form1.MainContent.ResetButton1::click - (JavaScript, client)

xfa.host.resetData();

Many thanks

David

My Product Information:
Acrobat Pro 9.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You'll need to use the Acrobat JavaScript function for emailing the form. The form will also have to be Reader Enabled with Form Save Rights for this to work from Reader. This can be done from Acrobat Pro 8 or 9

Use this code to email the entire document

event.target.mailDoc({cTo:"me [at] mycom [dot] com",cSubject:"hello",cMsg:"here it is"});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/]http://www.adobe.com/devnet/acrobat/[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

wdrspens
Registered: Jul 22 2008
Posts: 94
Thom

Thank you very much - just what I needed

David