1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| Dim strHTML As String
Dim oEmail As Outlook.MailItem
Dim appOutlook As Outlook.Application
Set appOutlook = New Outlook.Application
Set oEmail = appOutlook.CreateItem(olMailItem)
oEmail.To = "destinataire@entreprise.fr"
oEmail.Subject = "RE: " & Me.Intitulé.Value
strHTML = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & _
"<HTML><HEAD>" & _
"<META http-equiv=Content-Type content=""text/html; charset=iso-8859-1"">" & _
"<META content=""MSHTML 6.00.2800.1516"" name=GENERATOR></HEAD>" & _
"<BODY><DIV STYLE=""font-size: 14px; font-face: Arial;"">"
oEmail.HTMLBody = strHTML & Replace("Réponse à la réclamation", vbCrLf, "<br>") & "</DIV></BODY></HTML>"
oEmail.Send
MsgBox "L'email à bien été envoyé", vbInformation
Set oEmail = Nothing
Set appOutlook = Nothing |
Partager