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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Howto send TWO attachment in DoCmd.SendObject..

Status
Not open for further replies.

petrovlis

Programmer
Jan 15, 2002
114
NL
I have now:

DoCmd.SendObject acSendReport, "repProductList", "HTML", Me.Email, , , StrSubject, strMessagetext

I like to make it with two attachments.

HOW ??

Thnaks William.
 
Hi William,

As far as I know .SendObject doesn't support multiple attachments. You may be better off looking at/using Automation (with Outlook if you are using it) if you need to send multiple attachments.
Another idea (not sure if it is applicable in your case) is that you could just send two e-mails, one with each of the attachments?

Hope this helps

Harleyquinn

---------------------------------
For tsunami relief donations
 
Try that:
Dim myApp As New Outlook.Application
Dim myItem As Outlook.MailItem

Set myItem = myApp.CreateItem(olMailItem)
With myItem
.To = address
.Attachments.Add "c:\a.txt"
.Attachments.Add "c:\abc.txt"
.Subject = "SubjectSomthing"
.ReadReceiptRequested = False
.Body = str
.Display
End With
myItem = Nothing
myApp = Nothing
 
There you go, Outlook Automation. [wink]

Just add a refernce to the 'Microsoft Outlook X.0 Object Library', X being the version of the library you have on your machine.

Harleyquinn

---------------------------------
For tsunami relief donations
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top