By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,641 Members | 2,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,641 IT Pros & Developers. It's quick & easy.

How can I attach two reports to the same Email?

P: n/a
Hi,
I have two reports that I want to attach to the same email:
rptBugReport
rptBugLog

I can sent the one using:
DoCmd.SendObject acOutputReport, "rptBugReport", acFormatSNP

How can I add the second?
I've tried:
DoCmd.SendObject acOutputReport, "rptBugReport" & "rptBugLog", acFormatSNP
Thanks
Barry
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Barry Edmund Wright wrote:
Hi,
I have two reports that I want to attach to the same email:
rptBugReport
rptBugLog

I can sent the one using:
DoCmd.SendObject acOutputReport, "rptBugReport", acFormatSNP

How can I add the second?
I've tried:
DoCmd.SendObject acOutputReport, "rptBugReport" & "rptBugLog",
acFormatSNP
Thanks
Barry


You cannot do this with SendObject unless you embed both reports as
subreports inside of a single "container" report.

You could use automation of a messaging library like CDO or Outlook and then
have as many attachments as you want. Example code found at link below.

http://www.mvps.org/access/modules/mdl0019.htm

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a
Thanks Rick, I'll put both reports as subrpt into a rpt as you suggest.

"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:GX****************@newssvr12.news.prodigy.com ...
Barry Edmund Wright wrote:
Hi,
I have two reports that I want to attach to the same email:
rptBugReport
rptBugLog

I can sent the one using:
DoCmd.SendObject acOutputReport, "rptBugReport", acFormatSNP

How can I add the second?
I've tried:
DoCmd.SendObject acOutputReport, "rptBugReport" & "rptBugLog",
acFormatSNP
Thanks
Barry


You cannot do this with SendObject unless you embed both reports as
subreports inside of a single "container" report.

You could use automation of a messaging library like CDO or Outlook and
then
have as many attachments as you want. Example code found at link below.

http://www.mvps.org/access/modules/mdl0019.htm

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.