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
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