In Cell A I have names, e.g. John Smith
In Cell B I have a criteria - Due/ Not Due.
I need to somehow modify the below code to do the following:
Generate emails from cell A, in the format [email protected]
and Then send out a reminder email, but only to unique emails in one email.
So far this is what I have:
Sub SendEmail()
Dim OutlookApp As Outlook.Application
Dim MItem As Outlook.MailItem
Dim cell As Range
Dim Subj As String
Dim EmailAddr As String
Dim Recipient As String
Dim Msg As String
'Create Outlook object
Set OutlookApp = New Outlook.Application
'Loop through the rows
For Each cell In Columns("A").Cells.SpecialCells(xlCellTypeVisible)
If cell.Value Like "*@*" And _
LCase(Cells(cell.Row, "B").Value) = "Due" _
Then
EmailAddr = EmailAddr & ";" & cell.Value
End If
Next
Msg = "Please review the following message."
Subj = "This is the Subject Field"
'Create Mail Item and view before sending
Set MItem = OutlookApp.CreateItem(olMailItem)
With MItem
.To = EmailAddr
.Subject = Subj
.Body = Msg
.Display
End With
End Sub
I can't get much further, unfortunately. Can anyone help me please?