If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
emailing multiple reports
I have an access 2003 form with entries that are used to make 2 separate
reports. I want to place a command button on the form to have both reports attached to one email. thanks for your help -- rjpohl |
#2
|
|||
|
|||
emailing multiple reports
you can do it, but (as far as i know) you cannot use the usual
DoCmd.SendObject I believe you would need to use DoCmd.OutputTo, and save both reports to a particular folder location. Then you can build an email in VBA and attach those 2 documents. so the OutputTo command would look like this (create the directory first): DoCmd.OutputTo acOutputReport, "rptTest", acFormatSNP, "C:\TempDir \rptTest.snp" DoCmd.OutputTo acOutputReport, "rptTest2", acFormatSNP, "C:\TempDir \rptTest2.snp" Then here is the code for creating the email: Dim OlApp As Object Dim OlMail As Object Set OlApp = CreateObject("Outlook.Application") Set OlMail = OlApp.createitem(olmailitem) OlMail.Recipients.Add " OlMail.Subject = "Here are your 2 reports" OlMail.Body = "Please see attachments" OlMail.Attachments.Add "C:\TempDir\rptTest.snp" OlMail.Attachments.Add "C:\TempDir\rptTest2.snp" OlMail.Display 'change this to OlMail.Send if you just want to send it without previewing it |
#3
|
|||
|
|||
emailing multiple reports
"rjpohl" wrote in message ... I have an access 2003 form with entries that are used to make 2 separate reports. I want to place a command button on the form to have both reports attached to one email. thanks for your help -- rjpohl |
#4
|
|||
|
|||
emailing multiple reports
nnxxnbbb
"rjpohl" a écrit dans le message de groupe de discussion : ... I have an access 2003 form with entries that are used to make 2 separate reports. I want to place a command button on the form to have both reports attached to one email. thanks for your help -- rjpohl |
Thread Tools | |
Display Modes | |
|
|