I would like to create an email for each row in a spreadsheet which does not have a date in the D column (example spreadsheet attached) and I would like it to ignore each row where there is already a date.
Where there is a date I would like to create an email (I have already been thinking about using the code like something below
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Appl
Set OutMail = OutApp.CreateItem(0)
strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"
On Error Resume Next
.To = "firstname.lastname@example.org"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = strbody
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
But I would like to put the email address in column C in the .to and the first name in the text somewhere in the strbody which is in column A. It would also be great to put the current date in column D if an email was generated for that row?
would someone be able to help me create the loop and link this to the email and pull that information needed into the email ;)?