Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies. Only from Platform Scholar.
Sub TranSEmail() Dim OutApp As Object Dim OutMail As Object Dim Cel As Range Dim i As Integer Application.ScreenUpdating = False Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon For Each Cel In Columns("D").Cells.SpecialCells(xlCellTypeConstants) If Now() - Cells(Cel.Row, "A") > 21 And LCase(Cells(Cel.Row, "E").Value) <> "yes" Then Set OutMail = OutApp.CreateItem(0) With OutMail .to = Cel.Value .Subject = "Order Number " & Cells(Cel.Row, "F").Value .Body = "Hello " & Cells(Cel.Row, "C").Value & "!" & vbNewLine & vbNewLine _ & "I am writing about your recent purchase of " & Cells(Cel.Row, "B").Value _ & ". I want to make sure all went well with your order. If you have any questions or concerns at all please let me know by email at firstname.lastname@example.org. I appreciate this opportunity to serve you and sincerely hope you are having a nice day!" _ & vbNewLine & vbNewLine & "Very Sincerely Yours, " & vbNewLine & " Brian" .Display End With Set OutMail = Nothing Cells(Cel.Row, "E").Value = "Yes" End If Next Cel Application.ScreenUpdating = True End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.