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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email from Access Database 1

Status
Not open for further replies.

withoutwax

Technical User
May 29, 2008
12
0
0
GB
I have an MS Access database which holds thousands of records. I have created a function whereby I can select a category of contacts eg Social Workers and send them an email. What I would like to do is send them an email but in the body of the email put their individual contact details in there. So instead of sending a blanket email to each person, I would like each email to be specific to that contact. Hope that all makes sense. I would be grateful for any assistance.
 
You can do this with Word Mailmerge or you can use a recordset.

Some notes:

Code:
strSQL="SELECT Fname,Sname,Email FROM Contacts WHERE Type='Social Worker'"

Set rs=CurrentDB.OpenRecordset(strSQL)

strBody="Hello "

Do While Not rs.EOF
    DoCmd.SendObject acSendNoObject, , , rs!Email, , , "Hi", strBody & rs!Fname, True
    rs.MoveNext
Loop

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top