Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VB code to send Auto Response Emails

Status
Not open for further replies.

csunsun

Technical User
Apr 29, 2003
41
US
Hi,

I want to import MS Excel spreadsheets to an MS Access db and send auto response emails to recipients listed in the spreadsheet.

Any helpful tips?

I am assuming:

1. import spreadsheet (with email recipients)
2. open data access page (with email text)
3. send object (to recipient on imported spreadsheets)

Can I write code to say send this page to all recipients in Email field in Daily table??

Thanks!
 
Have you looked at SendObject? You will also find quite a lot on email in the FAQs.
 
HI,

Yes I have checked it out...

I jut need to know how to send the emails to all recipients in a field in the table I am importing since the recipients will change daily. Seems as though you can only type in a specific email address or name of a distribution list....

Anyone know how to do this? I tried to build an expression [Daily Table]![Email Address]in the "To" field...but there was an error.

Thanks!
 
Here is what I tried...

DoCmd.SendObject , "", "", "[TBL Daily Credit Requests]![F1]", "", "", "Your Credit Request Has Been Received by LowerMyBills.com", "Hi, Please allow 14 days to receive your credit. ", False,
 
Do not put quotes around the form or table data:
[tt]DoCmd.SendObject , "", "", [TBL Daily Credit Requests]![F1], "", "", "Your Credit Request Has Been Received by LowerMyBills.com", "Hi, Please allow 14 days to receive your credit. ", False, ""[/tt]

I am not sure if [TBL Daily Credit Requests]![F1] is from a form or table, the format looks like a form, but the name looks like a table.
It is possible to loop through recordsets and send to each person. You will find quite a few posts on this topic, for example:
SendObject Method: e-mail to list with VBA
thread181-55134
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top