Multiple attachements in 1 email

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Back
Top