Emailing acTables form Access

  • Thread starter Thread starter Junior
  • Start date Start date
J

Junior

hi - I want to email several tables as email attachements on click event.
this macro- converted to VBA works - except it only attaches the first
table-
is there a way to have several tables attached to a single outlook email?

Function Macro1()
On Error GoTo Macro1_Err

DoCmd.SendObject acTable, "tblCostOrg", "MicrosoftExcel(*.xls)",
"(e-mail address removed)", "", "", "CostOrg Table", "", False, ""
DoCmd.SendObject acTable, "tblStaNum", "MicrosoftExcel(*.xls)",
"(e-mail address removed)", "", "", "CostOrg Table", "", False, ""

Macro1_Exit:
Exit Function
 
Hello Junior,

Unfortunately, you get only one attachment with SendObject. You may want to
consider using Automation to send your emails with multiple attachments.
Here are a couple of links to get you started:

HOW TO: Use Automation to Send a Microsoft Outlook Message using Access 2000
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q209948

MSDN Article with Sample code for creating appointments and emails:
http://tinyurl.com/2knwj

Tony Toews' Access Email FAQ and Links page:
http://www.granite.ab.ca/access/email.htm
 
thanks
Cheryl Fischer said:
Hello Junior,

Unfortunately, you get only one attachment with SendObject. You may want to
consider using Automation to send your emails with multiple attachments.
Here are a couple of links to get you started:

HOW TO: Use Automation to Send a Microsoft Outlook Message using Access 2000
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q209948

MSDN Article with Sample code for creating appointments and emails:
http://tinyurl.com/2knwj

Tony Toews' Access Email FAQ and Links page:
http://www.granite.ab.ca/access/email.htm
 
Back
Top