-----Original Message-----
Here is some code suitable for use with Outlook Automation that will add
recipients from a recordset:
Dim oApp As Outlook.Application
Dim objNewMail As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim db as DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDB
Set rs = db.OpenRecordset("MyQuery", dbOpenDynaset)
Set oApp = New Outlook.Application
Set objNewMail = oApp.CreateItem(olMailItem)
With objNewMail
rs.MoveFirst
Do While Not rs.EOF
If Len(Trim(rs!Email)) > 0 Then
Set objOutlookRecip = .Recipients.Add(rs! Email)
objOutlookRecip.Type = olTo
End If
rs.MoveNext
Loop
.Subject = "Test subject"
.Body = "Your text message here."
.Save
.Send
End With
rs.Close
Set rs = Nothing
--
Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX
.