Connecting Tech Pros Worldwide Help | Site Map

How to send mails using Code without opening Outlook

AR Ratheesh's Avatar
Newbie
 
Join Date: Jul 2009
Posts: 12
#1: Oct 16 '09
Hi Guys,
Need help to sent mails using code.i have a table containing 2 fields 1.Name,2.Email ID.and an another table(Data to be attached).
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command0_Click()
  2. On Error GoTo Err_Command0_Click
  3.  
  4.     DoCmd.SendObject acTable, "Table1", "MicrosoftExcelBiff5(*.xls)", "sentname@aaa.com", "", "", "trail", "", False, ""
  5.  
  6. Exit_Command0_Click:
  7.     Exit Sub
  8.  
  9. Err_Command0_Click:
  10.     MsgBox Err.Description
  11.     Resume Exit_Command0_Click
  12.  
  13. End Sub
But this will shows the Outlook.I dont want to show Outlook and sent mailing process should be in background...
Please help me...
thanks in adv.
Expert
 
Join Date: Jul 2009
Location: KY
Posts: 244
#2: Oct 16 '09

re: How to send mails using Code without opening Outlook


I don't know about MS Access 2007, but I have extensively researched emailing from MS Access 2003, and the issue is that if you want to be able to send an email without Outlook popping up, the only way i know of is if you can use your company's "SMTP Mail Host". If you can get that, then I can walk you through how to use that to email with CDO.

This is much more technical, so let me know if you wish to go forward with this.

-AJ
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,672
#3: Oct 17 '09

re: How to send mails using Code without opening Outlook


Please notice the edit comments. You must post code using the tags in future.
Reply