Unanswered: Adding email addresses to outlook "to" field from access database
I would like to know how to add email addresses to the "to" field in outlook from an access database.
I have different groups in my db and each has clients and need to extract the emails per group and export to outlook so i can send one email to a specific group members.
make a list box on a form. This will have the name,email of the people to send to.
then click a Send button to run ScanAndEmail below.
It will run thru the list and send the report.
Public Sub ScanAndEmail()
Dim vTo, vSubj, vBody, vRpt
dim i as integer
vRpt = "rReport1"
vBody = "body of email"
vSubj = vRpt
'scan the list box
For i = 0 To lstEAddrs.ListCount - 1
vTo = lstEAddrs.Column(2) 'get the email from listbox
DoCmd.SendObject acSendReport, vRpt, acFormatPDF, vTO, , , vSubj, vBody