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
| Sub QQQessaie()
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("D:\0 aTest\PicOut\Puzzle Draw.gif") 'Changer le chemin et le nom de l'image
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:D:\0 aTest\PicOut\Puzzle Draw.gif'></BODY>" 'Nom de l'image sans chemin
.Save
.Display 'Send Display permet d'afficher le message, Send l'envoie sans affichage
End With
Set oAttach = Nothing
Set ColAttach = Nothing
Set ObjMail = Nothing
Set objOL = Nothing
End Sub |
Partager