Sending email w/Access2000 and Outlook

3

3wood

I'm using Access2000 and want to send an email to all the
receipants in a table. I can hard code the names into the
form, but I want a dynamic way of handling names and would
prefer referencing the table. Any help would be
appreciated.
 
S

Steve Schapel

3wood,

Here is a snippet of "air code" that might help...

Dim strTo As String
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("YourTable")
With rst
Do Until .EOF
strTo = strTo & ![EmailAddress] & ", "
.MoveNext
Loop
End With
Set rst = Nothing
strTo = Left(strTo,Len(strTo)-2)
DoCmd.SendObject acSendNoObject, , , strTo, , , "My Subject", "My Message"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top