Using Recordset on email

harrisw

Registered User.
Local time
Today, 15:00
Joined
Mar 27, 2001
Messages
131
I have a recordset that holds an email address for customers.

I've done the code that finds the right customer but how can I do

olNewMailitem.to rsContacts(10)

The above doesn't work. I think the syntax may be wrong.
 
Post your code so as to see what you are trying to achieve.
 
sample of the relevant code below

Dim rsContacts As Recordset
..
..
Set rsContacts = dbase.OpenRecordset("tblcontacts")
..
..
rsContacts.FindFirst "[contactid]= " & cboJobContact '
..
..
olNewMail.To = "'rscontacts(10)'"
olNewMail.Body = "body text."
olNewMail.Attachments.Add ("c:\Order Confirmation.doc")
olNewMail.Attachments.Add ("w:\dosapps\delta5\private\b2bdbase\b2b\letters\Terms and Conditions.doc")
olNewMail.Subject = "Order Confirmation"
olNewMail.Display
 

Users who are viewing this thread

Back
Top Bottom