How to send a mail to multiple recipients from Microsoft Excel sheet?

5 pts.
Tags:
Microsoft Excel
Microsoft Excel macros
I have an excel sheet. This excel sheet has data for many recipients. every row has an email address (lotus/outlook) and then the next four cell in the same row has the data for the same recipient. I want a macro to be created so that when I run this macro a new mail is drafted for each recipient using the email address written in the first cell of each row and the body of the mail should contain the data entered in the next four cells of the row containing the email address in my excel sheet. Can anybody help?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Sub sendemail()
Dim ol As New Outlook.Application
Dim OLF As Outlook.MAPIFolder

Dim ml As Outlook.MailItem

Set ml = ol.CreateItem(olMailItem)

i = 1

Do While Sheet1.Cells(i, 1) <> ""
ml.Recipients.Add Sheet1.Cells(i, 1)
ml.Body = Sheet1.Cells(i, 2) & " " & Sheet1.Cells(i, 3) & " " & Sheet1.Cells(i, 4)
ml.Send
i = i + 1
Loop

End Sub

Use the above code to send email

Sarfaraz Ahmed

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following