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!

SendObject to email recipients in a field

Status
Not open for further replies.

csunsun

Technical User
Apr 29, 2003
41
US
hi,

i wanted to run the send object function to send an auto response email to multiple email recipients in a field of a table.

how can i write this??

i already tried

[TBL Daily Import Test]![RequestorEmail] in the "To" part of the macro....


Thanks!
 
i just wrote that in the macro...haven't done any coding.

thanks
 
Sorry, I know zip about macros because I never use them.

There are good reasons for using code instead of macros in general. Switching is easy, just see VBA Help "Convert macros to Microsoft Visual Basic".

Also, search Tek-Tips, "Search Posts" option, keyword "SendObject", there are lots of posts.

An alternative method here:

VBA code E-Mail method (better than SendObject)
Microsoft: Access Modules (VBA Coding) FAQ/faq705-537


TomCologne
 
Ok,

here is the code!

Option Compare Database

'------------------------------------------------------------
' TEST_AUTO
'
'------------------------------------------------------------
Function TEST_AUTO()
On Error GoTo TEST_AUTO_Err

DoCmd.SendObject acQuery, "Query2", "HTML(*.html)", "[TBL Daily Import Test]![RequestorEmail]", "", "", "TESTiNG", "testing123", False, ""


TEST_AUTO_Exit:
Exit Function

TEST_AUTO_Err:
MsgBox Error$
Resume TEST_AUTO_Exit

End Function

Thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top