Private Sub CommandButton2_Click() ' ceci correspond au bouton "Envoyer le message" qui ouvre et compléte Outlookexpress
'================================================
Dim objOL As Object, ObjMail As Object
Dim oAttach As Object, ColAttach As Object
Set objOL = CreateObject("Outlook.Application")
Set ObjMail = objOL.CreateItem(0)
Set ColAttach = ObjMail.Attachments
Set oAttach = ColAttach.Add("C:\Bonjour XXX.jpg>") 'Changer le chemin et le nom de l'image RIEN NE PASSE!
With ObjMail
.To = Cells(8, 11)
.CC = Cells(9, 11)
.Subject = Cells(7, 11) & "Test" & Cells(7, 3)
.HTMLBody = "<BODY><FONT face=Arial color=#000080 size=2></FONT>" & _
"Bonjour, <br><br><IMG src=cid:Bonjour XXXX.jpg></BODY>" 'Nom de l'image sans chemin
ObjMail.Save
.Display 'Send Display permet d'afficher le message, Send l'envoie sans affichage
End With
' ActiveWorkbook.Close
Set oAttach = Nothing
Set ColAttach = Nothing
Set ObjMail = Nothing
Set objOL = Nothing