I need help in modifying this code:
Currently this code send out reminder email 28 days before the event. I now need it to also send a second reminder within 14 days of the event.
Thank you in advance!!!!
Sub gahallmark()
Dim OutLookApp As Object
Dim OutLookMailItem As Object
Dim icounter As Integer
Dim maildest As String
Dim mydate1 As Date
Dim mydate2 As Long
Dim datetoday1 As Date
Dim datetoday2 As Long
Dim rownum As Long
Dim mystr As String
rownum = 2
Do Until Cells(rownum, 2).Value = ""
If Cells(rownum, 2).Value <= Date + 14 And Cells(rownum, 4).Value = "Send Reminder" Then ''change made here
mystr = mystr & ", " & Cells(rownum, 1).Value
End If
rownum = rownum + 1
Loop
mystr = Mid(mystr, 3)
Dim x As Long
lastrow = Sheets("GA-Hallmark").Cells(Rows.Count, 1).End(xlUp).Row
For x = 3 To lastrow
mydate1 = Cells(x, 2).Value
mydate2 = mydate1
Cells(x, 6).Value = mydate2
datetoday1 = Date
datetoday2 = datetoday1
Cells(x, 7).Value = datetoday2
If mydate2 - datetoday2 = 28 Then
Cells(x, 4) = "Send Reminder"
Cells(x, 3).Font.ColorIndex = 3
Cells(x, 3).Font.Size = 16
Cells(x, 3).Font.Bold = True
Cells(x, 3).Value = mydate2 - datetoday2
End If
Next
Set myApp = Nothing
Set mymail = Nothing
Bookmarks