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

How do you Export multiple reports in VBA

anoble1
100+
P: 230
I am trying to email 3 reports with 1 function where it will email 3 attachments. Right now, i can only send 1 attachment at a time. My question is; how do I send multiple reports along with this: rptPSSRMonthlyLaborSalesByPSSR?

Expand|Select|Wrap|Line Numbers
  1. cmbPSSR.Value = "075"
  2.         DoCmd.SendObject acOutputReport, "rptCommissionStatement", "rptPSSRMonthlyLaborSalesByPSSR", acFormatPDF, "asdf@something.com"
I have tried something like this, but didn't work.
Expand|Select|Wrap|Line Numbers
  1. cmbPSSR.Value = "075"
  2.         DoCmd.SendObject acOutputReport, "rptCommissionStatement" And "rptPSSRMonthlyLaborSalesByPSSR", acFormatPDF, "asdf@something.com"
May 15 '15 #1

✓ answered by Rabbit

Create a report that includes all 3 as subreports.

If you need them as separate attachments. You will need to code the message by itself by automating outlook. You will not be able to do it with SendObject.

Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,430
Create a report that includes all 3 as subreports.

If you need them as separate attachments. You will need to code the message by itself by automating outlook. You will not be able to do it with SendObject.
May 15 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.