Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple E-mail Attachments ?? 1

Status
Not open for further replies.

steph22

Technical User
Oct 28, 2000
14
US
Does anyone know if it's possible to attach multiple tables/query results etc. to an e-mail using the SendObject command? I have 3 reports I need to send to each recipient and I would like to be able to send them all in one shot (one e-mail) through Access rather than having to export the file and then manually attach and send with Netscape.

Thanks for any help!
Stephanie
 
Yes I know this isn't using the SendObject method but I don't believe it can be used to send mutiple objects in a single message. Correct me if I'm wrong. But here is an alternative if, and only if, you use Outlook. You could convert it an use MAPI relatively simply. Note that you can add any number of attachments.


This is just a sample. I build the other message variables within the module as separate functions within the application and automated agendas and minutes. You would need to add a reference to the Outlook libaries.

Steve King

Dim oMailApp As New Outlook.Application
Dim oMail As New MailItem

Set oMailApp = CreateObject("Outlook.Application")
Set oMail = oMailApp.CreateItem(olMailItem)
With oMail
.To = strAddressees
If Len(strCC) > 0 Then
.CC = strCC
End If
.Subject = strSubject
.Body = strBody
.Importance = olImportanceHigh
.Display
.Sensitivity = olPrivate
.Attachments.Add (strFilename)
End With
 
Thanks Steve!

I will play around with this and give it a try!

Stephanie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top