A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

emailing multiple reports



 
 
Thread Tools Display Modes
  #1  
Old March 8th, 2010, 06:40 PM posted to microsoft.public.access
rjpohl
external usenet poster
 
Posts: 2
Default 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  
Old March 8th, 2010, 08:14 PM posted to microsoft.public.access
ghetto_banjo
external usenet poster
 
Posts: 325
Default 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  
Old March 13th, 2010, 05:40 PM posted to microsoft.public.access
De Jager
external usenet poster
 
Posts: 393
Default 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  
Old March 17th, 2010, 01:36 PM posted to microsoft.public.access
joelgeraldine
external usenet poster
 
Posts: 201
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.