Muleitple E-mail VBA

Status
Not open for further replies.

maxx_daddy

Board Regular
Joined
Dec 3, 2010
Messages
74
OK, lets start small I want this code to start one email for every e-mail address in column "L". Right now it is making one for the last address found.

Thoughts?

Sub SendEmail()
Dim olApp As Outlook.Application
Dim olMail As MailItem
Dim cell As Range
Dim Subj As String
Dim EmailAddr As String
Dim Recipient As String
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
For Each cell In Columns("L").Cells.SpecialCells(xlCellTypeVisible)
If cell.Value Like "*@*" Then

With olMail
.To = cell.Value
.Subject = "Your recent quote"
.HTMLBody = "<H3><B>Dear " & "joe" & "</B></H3>" & "Please contact us to discuss bringing your account up to date.<BR><BR>" & "<B>Regards Ron de Bruin</B>"
.Save

End With

End If
Next
Set olMail = Nothing
Set olApp = Nothing

End Sub
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Status
Not open for further replies.

Forum statistics

Threads
1,224,537
Messages
6,179,408
Members
452,912
Latest member
alicemil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top