PipMic
asked on
Sending an email using MSAccess 97 and 03
Hi all,
Currently I have an Access programme which I can print reports from.
I was wondering if there is a way of rather than printing the report I could automatically attach it to a blank email of MS Outlook Express or MS Outlook 03.
I know it can be done in A07 but was wondering if anyone would have the code to be able to do it in these two other versions.
thanks...
Currently I have an Access programme which I can print reports from.
I was wondering if there is a way of rather than printing the report I could automatically attach it to a blank email of MS Outlook Express or MS Outlook 03.
I know it can be done in A07 but was wondering if anyone would have the code to be able to do it in these two other versions.
thanks...
ASKER
Hi,
Thanks for your reply.
Basically I have two buttons on a form
1. Print Previews an A97/03 report
2. Prints an A97/03 report
My idea was to have an additional button which would email the report. This being as automated as possible.
The idea was to first create a pdf of the report and then attach it to a blank outlook express or outlook 03 email. All I would then need to do is enter the email I would want to send it to, add the subject, enter some comment and then press send.
That is it. I can understand that there would be a lot of code involved but that in a nutshell is it.
I will look through the links provided to see if these meets my requirements.
Thanks
Thanks for your reply.
Basically I have two buttons on a form
1. Print Previews an A97/03 report
2. Prints an A97/03 report
My idea was to have an additional button which would email the report. This being as automated as possible.
The idea was to first create a pdf of the report and then attach it to a blank outlook express or outlook 03 email. All I would then need to do is enter the email I would want to send it to, add the subject, enter some comment and then press send.
That is it. I can understand that there would be a lot of code involved but that in a nutshell is it.
I will look through the links provided to see if these meets my requirements.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If your emailing needs are fairly simple, then you can attach a report in Access 2003 or 97 to an email, if you use the .rtf (Word), html, Text, or Excel formats
...Basic code looks like this:
DoCmd.SendObject acSendReport, "YourReportName", acFormatHTML, "You.You@You.com", , , "Report Attached", "Here is your Report"
See the help files on "SendObject" for more info.
See here for the different formats:
http://msdn.microsoft.com/en-us/library/office/aa141552%28v=office.10%29.aspx
If you would like to send a PDF you can use this (but you need to be good at VBA)
http://www.lebans.com/reporttopdf.htm
Need more complex emails, you will have to use even more complex code like this:
http://support.microsoft.com/kb/161088
;-)
JeffCoachman