How to attach documents using SendObject function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • FreddieIT
    New Member
    • Feb 2010
    • 13

    How to attach documents using SendObject function

    I have a database that I would like to print out 2 seperate documents, which I have done and I also want to e-mail the same 2 documents. I am using the SendObject function, but I can't seem to get the 2 documents to attach, is this even possible? If so, what am I missing?

    Code:
    DoCmd.OpenReport "rptCommunication"
        DoCmd.OpenReport "rptCommunicationCoverSheet"
        DoCmd.SendObject acSendReport, "rptCommunicationCoverSheet" also "rptCommunication", "Rich Text Format", , , , "IDP - Communication for the month of" + " " + [Month]
        DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
        DoCmd.GoToRecord , , acNewRec
        DoCmd.Close
    Thank you again
    Last edited by Niheel; May 27 '10, 07:20 PM. Reason: removed thank you
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    SendObject appears to be limited to one file at a time. You'll have to call it twice.

    Comment

    • patjones
      Recognized Expert Contributor
      • Jun 2007
      • 931

      #3
      You might be interested in this thread which I recently participated in, and which I believe speaks directly to your issue: How to send email with a report as an attachment

      Pat

      Comment

      Working...