emailing multiple reports

IfButOnly

Registered User.
Local time
Tomorrow, 03:10
Joined
Sep 3, 2002
Messages
236
My Access 2002 application will allow users to select multiple email addresses and attachments from different screens and press a button to send it off. The user clicks on various listboxes and can add the item as either an address or attachment - the list boxes are populated from different tables and are not necessarily related in any way.

I am using DoCmd.SendObject and am having problems with working out how to attach the multiple reports. I can attach one with SendObject, acSendReport ... command......

Can anyone help with how to go about this?

Thanks in advance

Peter
 
You will have to use Outlook Automation.

See Knowledge Base Articles:

OL97: How to Automate Outlook from Another Program
ID: Q168095

OL98: How to Automate Outlook from Another Program
ID: Q181202
 
Travis, thanks for your reply - I had a look at the KBA's but still confused.

Basically what I am doing is collecting a series of ID's for different reports (each report having its own public variable to hold the ID's for that report) - once the user clicks the email button, I need the reports to open (using the public variable in the filter) and attach each of the reports to the email. The SendObject worked fine for one report and I had hoped to accomplish it all with a macro until I discovered that it was not possible with SendObject.

Does Outlook Automation do what I am after?

The KBA used the following code-

Set objOutlookAttach = .Attachments.Add(Attachment Path)

Could you give me an example of how to code this for a specific report - if this is the correct code I assume I would have five lines of this, each referring to a possible report??

Hope this makes some sense..

Thanks..........PeteR
 
Pete,

What you will need to do is to export the reports out to a file and then attach the files.
 

Users who are viewing this thread

Back
Top Bottom