Jun 1, 2006 #1 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!
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!
Jun 1, 2006 #2 TomCologne Technical User Apr 18, 2002 628 How about posting the complete code? TomCologne Upvote 0 Downvote
Jun 1, 2006 Thread starter #3 csunsun Technical User Apr 29, 2003 41 US i just wrote that in the macro...haven't done any coding. thanks Upvote 0 Downvote
Jun 1, 2006 #4 TomCologne Technical User Apr 18, 2002 628 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 Upvote 0 Downvote
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
Jun 2, 2006 Thread starter #5 csunsun Technical User Apr 29, 2003 41 US 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!! Upvote 0 Downvote
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!!