Sub EnvoieMailALaDateDuJour()
Dim OutApp As Object, OutMail As Object, c As Range
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
For Each c In Columns("B").Cells.SpecialCells(2)
If c.Value Like "?*@?*.?*" And c.Offset(, 1) = Date Then
'juste pour tester
' MsgBox "Bonjour, " & c.Offset(, -1) & Chr(13) & Chr(13) & "Ici corps du message."
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = c.Value
.Subject = "Alerte"
.Body = "Bonjour," & Chr(13) & c.Offset(, -1) & Chr(3) & Chr(13) & "Ici corps du message."
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
End If
Next c
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
End Sub