Bonsoir a tous !
j'ai jeté un oeil sur l'automatisation d'envoie de mail, avec lien internet, en html, mais rien sur l'incorporation d'image dans le contenu du mail. C'est toujours en pièce jointe.

N'y a t'il pas moyen d'utiliser cette pièce jointe pour égaïer le contenu du mail?

cette page :Tutoriels montre comment faire du corps d'un mail une page web, alors sur cette base, peut on y joindre une image ?


J'essaie ce code, mais biensur, ca fonctionne pas !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Sub htmlmail()
Dim iMsg As Object, iConf As Object
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Dim BODY As String
Dim Fichier As Variant
Dim NomFich1
Dim Chemin
Chemin = ThisWorkbook.Path
    NomFich1 = "image001.jpg"
Fichier1 = Chemin & "\test_mail_html_fichiers\" & NomFich1
    If Fichier1 = False Then Exit Sub
BODY = BODY & "<head>"
BODY = BODY & "<title>Ceci est mon titre</title>"
BODY = BODY & "</head>"
BODY = BODY & "<body>"
BODY = BODY & "<p>Ceci est mon text.</p>"
BODY = BODY & "<p >Il doit y avoir une image en dessous.</p>"
BODY = BODY & "<p>&nbsp;</p>"
BODY = BODY & "<p>Je voudrais que ce soit plus sympa.</p>"
BODY = BODY & "<p>"
BODY = BODY & "<img width=604 height=453 src=" & NomFich1 & "></p>"
BODY = BODY & "<p>&nbsp;</p>"
BODY = BODY & "<p>c’est réussi.</p>"
BODY = BODY & "<p>&nbsp;</p>"
BODY = BODY & "<p>Bonne réception</p>"
BODY = BODY & "<p>&nbsp;</p>"
BODY = BODY & "<p>yahi</p>"
BODY = BODY & "</div>"
BODY = BODY & "</body>"
With iMsg
    Set .Configuration = iConf
    .To = "mail@fournisseur.fr" 'Renvoie une erreur si l'adresse est non valide
    '.From = "youralias@yourdomain.com"
    .Subject = "Test Envoi Page Web par mail avec photo"
    .HTMLBody = BODY
    .AddAttachment Fichier1
    .Send
End With
End Sub
Avis aux amateurs de résolutions !

merci.

yahi