Here is your code
Sub Send_Email() Dim OutApp as Object, OutMail As Object Dim lLastRow as Long, lRow as Long Dim sSendTo as String, sSendCC as String, sSendBCC as String Dim sSubject as String, sTemp as String On Error goto errHandler SetOutApp = CreateObject("Outlook.Application") OutApp.Session.Logon ' Change the following as needed sSendTo = "Michael@lafamilialf.com" sSendCC = "mrempel@excel-bytes.Com" sSubject = "Project Past Due!" lLastRow = Cells(Rows.Count,1).End(xlUp).Row For lRow = 2 to lLastRow If Cells(lRow ,4)<>"Completed" Then If Cells(lRow,2)<=Date Then SetOutMail = OutApp.CreateItem(0) ' On Error Resume Next With OutMail .To = sSendTo If sSendCC > " " Then .CC = sSendCC If sSendBCC > " " Then .BCC = sSendBCC .Subject = sSubject sTemp ="Hello!" & vbCrLf & vbCrLf sTemp = sTemp & "The due date has passed fro this project: " & vbCrLf & vbCrLf ' Assumes project name is in Column B sTemp & " " & Cells(lRow,1) & vbCrLf & vbCrLf sTemp = sTemp & "Please take appropriate action." & vbCrLf & vbCrLf s temp = sTemp & "Thank You!" & vbCrLf .Body = sTemp ' Change the following to.Send if you want to send the message without reviewing first .Send .Send End With Set OutMail = Nothing Cells(lRow,6) = "E-mail sent on: " & Now() End if End If Next lRow exitHere: Set OutApp = Nothing Exit Sub errHandler: MsgBox "Error " & Err.Number & ": " & Err.Description Resume exitHere End Sub




					
				
                    
            
            
                
            
        
					
					
					
						
  Reply With Quote