Printing a Form and Attaching it

Hi I wondered if there is a way of clicking a button on a form that creates an a new email with an attachment of the form itself as a PDF. The address for the email will be taken from the form.

I have tried a couple of things but so far I can only email a doc link to the record.

Subject: I used PDFCreator

I have done something like that a few years ago. I used SourceForge’s PDFCreator. I don’t have the code right here, but here is what I did.

  1. You need to install PDFCreator. It will instal a new printer called PDFCreator in your available printer.

  2. You add a button that will set PDFCreator as the default printer, sets the attributes such as the file name, where to save and such.

  3. Print, your PDF file will get created on your local disk.

  4. After printing you set back the default printer back to the original value

  5. Create the mail, attach the file and kill it (erase it from the hard drive)

Voilà.

You probably can find examples on the forum, if you can’t find some, let me know and I’ll look for my code somewhere. I can tell you it works just fine with version 7 and up.

Subject: I used PDFCreator

Hi AlainI am looking for the same solution. Print the notes document into pdf file in the background without user interaction and send as attachment to user. Can you please post your code. I tried couple of days to make it to work still it is prompting me to save the file. Not sure how to setup the filename. Please help me here.We are using adobe reader 9. I tried to use the Print to file or Email as default printer. Thank you for your help.