Question : Email Access Report using PDFCreator and Outlook

Hello

I want to have a email button on a form, this will automatically email Access report as a PDF using Outlook.

Only way I can think this can be done is to use PDF Printer (I have chosen to use PDFCreator) and save PDF file into the folder.  Next step is to email this PDF file using Outlook.

Can you please provide VBA code to do this.

ps. I used  SendObject to HTML, this worked fine, but I loose too much of the formatting, also it prints multipages reports into multiple HTML files and what I really need is PDF files I can send to customers.

Access Version 97

Answer : Email Access Report using PDFCreator and Outlook

Pekka_Anttila,

The brevity of your question belies its complexity.

Asking how to send an email is like asking how to build a house.
;-)

Questions:
How is you db structured
Where are the email addresses
What is your skill level with VBA
How do you determine who get the email
Do you want to see the email first or just send it.
Is this report to be filtered?
What version of Access/Office/Outlook are you using?
...ect

If you are using Access/Office/Outlook 2007, this is easy:
DoCmd.SendObject acSendReport, "ReportName", acformatPDF, "EmailAddress", , , "Subject", "MessageText"

If you need this in Office 2003 then you may have to do some filtering and or looping.

So,

Can you please explain, step by step, how you want this system to work.

Ex:
User opens the form.
User_____________
Then the user___________
Then they click__________
Then_________
Then an email ____________
...ect


If you just need a generic example of how this could be done using third party software, try this, it is based on the code found here:
http://www.lebans.com/reporttopdf.htm

JeffCoachman
Random Solutions  
 
programming4us programming4us