Bulk Mail send with different mail body contents

Local time
Today, 01:32
Joined
Jan 17, 2013
Messages
14
HI,

I have a ms access table with two fields...tablename is ..."Addresses"..

Field1:= Employee_mail_id
Field2:= Leave_balance

What I need to do is that,I need to send individual mail (in Bulk) two each employee intimating their leave balances.
Is it possible to do it in vb .I want it to assign the codes in a button.

Please help guys...

I got one vb code somewhere ..below is the code.

Dim r As Recordset
Dim email As String
Set r = CurrentDb.OpenRecordset("select * from Addresses")
Do While Not r.EOF
email = email & r(2) & ";"
r.MoveNext
Loop
r.Close

DoCmd.SendObject acSendNoObject, Null, Null, email, Null, Null, "Test subject", "Message body of the test letter", False, Null:banghead:
 
In general, create a query that gets both the employee address and value you want in the body. Loop that query instead of the addresses table. Move your SendObject inside the loop and use the current record for the email address. You can use the other value in the body:

"Your leave balance is " & r!FieldName & "."
 

Users who are viewing this thread

Back
Top Bottom