Multiple attachements in 1 email

B

Bruce

My code below sends by output as .xls as 3 separate emails.

Is it possible to modify so that the 3 attachments are added to the one email?

Bruce


Function exportRecords()

On Error GoTo myErr

DoCmd.SendObject acTable, "Price", "MicrosoftExcel(*.xls)", "", "", "",
"Export - Price", "", True, ""
DoCmd.SendObject acTable, "Quote", "MicrosoftExcel(*.xls)", "", "", "",
"Export - Quote", "", True, ""
DoCmd.SendObject acTable, "tbl_PricelistHDR", "MicrosoftExcel(*.xls)",
"", "", "", "Export - Price List Header", "", True, ""

myErr:
End

End Function
 
R

Rick Brandt

Bruce said:
My code below sends by output as .xls as 3 separate emails.

Is it possible to modify so that the 3 attachments are added to the one email?

Bruce


Function exportRecords()

On Error GoTo myErr

DoCmd.SendObject acTable, "Price", "MicrosoftExcel(*.xls)", "", "", "",
"Export - Price", "", True, ""
DoCmd.SendObject acTable, "Quote", "MicrosoftExcel(*.xls)", "", "", "",
"Export - Quote", "", True, ""
DoCmd.SendObject acTable, "tbl_PricelistHDR", "MicrosoftExcel(*.xls)",
"", "", "", "Export - Price List Header", "", True, ""

myErr:
End

End Function

Not using SendObject, no. You would have to use automation code to
execute code in an external messaging library like CDO or Outlook after
outputting the files to disk.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top