maxx_daddy
Board Regular
- Joined
- Dec 3, 2010
- Messages
- 74
Hi,
I have a working system that batches a generic e-mail, now the bossman wants it to send one e-mail to each person with their name on it.
I am "attempting" to add HTML to it too so I can use my signature.
Working off of Ron Debruins site, I have a column of e-mail addresses, with the persons first name either to the left or the right (doesnt matter) I need to have a single e-mail, created for each person. Right now I am hung up at
Dear "XXXX"
what am i doing wrong?
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
Emailaddr1 = Emailaddr1 & ";" & cell.Value
End If
Next
With olMail
.To = Emailaddr1
.Subject = "Your recent quote"
.HTMLBody = "<H3><B>Dear " & cell.Offset(0, 0).Value & "</B></H3>" & "Please contact us to discuss bringing your account up to date.<BR><BR>" & "<B>Regards Ron de Bruin</B>"
.Display
End With
Set olMail = Nothing
Set olApp = Nothing
End Sub
I have a working system that batches a generic e-mail, now the bossman wants it to send one e-mail to each person with their name on it.
I am "attempting" to add HTML to it too so I can use my signature.
Working off of Ron Debruins site, I have a column of e-mail addresses, with the persons first name either to the left or the right (doesnt matter) I need to have a single e-mail, created for each person. Right now I am hung up at
Dear "XXXX"
what am i doing wrong?
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
Emailaddr1 = Emailaddr1 & ";" & cell.Value
End If
Next
With olMail
.To = Emailaddr1
.Subject = "Your recent quote"
.HTMLBody = "<H3><B>Dear " & cell.Offset(0, 0).Value & "</B></H3>" & "Please contact us to discuss bringing your account up to date.<BR><BR>" & "<B>Regards Ron de Bruin</B>"
.Display
End With
Set olMail = Nothing
Set olApp = Nothing
End Sub