var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Converting a report to .dpf and emailing
Report name - WarrantyReminder
I have created a report based on a query. When I click on a button I would like a macro/code to open the report, convert the report to a .pdf file and email the .pdf to the email address from the active form
Email address = [Forms]![DataEntryForm]![Email]
What pdf writer are you using?
Im using ScanSoft PDF Create
The basic steps are:
1 Open/print the report using the PDF printer rather than the default printer
2 Save the pdf (try looking in your ScanSoft documentation, their website or a google search for code to handle 1 and 2)
3 create a new email
4 attach the pdf
5 send, save to draft, or edit the email
Do you know how to create the email? If not what email client are you using?
I would like all of this to be automated when I click a button.
I can setup a macro to open the report, run the print command but then you have to select "print to PDF Create" in the printer options box. Is there a way that you can avoid doing this part?
Also I want the email to pick up the email address from the active form so I don't have to type it in and then attach the pdf file.
To automate the pdf creation, you'll need to find or create the code (I use pdf995 so the code I have won't work for you). -steps 1 and 2
In order to help you with the email automation, we need to know what email client you're using. - steps 3-5
Grabbing information from the form to use on the email would be done in step 3.
I could download pdf995 if you are able to share your code?
I am using MS Outlook 2003 - do you have code to automate the email creation stage and grab the email address?