How do you Export multiple reports in VBA

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anoble1
    New Member
    • Jul 2008
    • 246

    How do you Export multiple reports in VBA

    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: rptPSSRMonthlyL aborSalesByPSSR ?

    Code:
    cmbPSSR.Value = "075"
            DoCmd.SendObject acOutputReport, "rptCommissionStatement", "rptPSSRMonthlyLaborSalesByPSSR", acFormatPDF, "asdf@something.com"
    I have tried something like this, but didn't work.
    Code:
    cmbPSSR.Value = "075"
            DoCmd.SendObject acOutputReport, "rptCommissionStatement" And "rptPSSRMonthlyLaborSalesByPSSR", acFormatPDF, "asdf@something.com"
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    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.

    Comment

    Working...