Bonjour cher membre forum,
J'envoie des mails avec des graphiques à plusieurs personnes. je suis capable d'envoyer ses fichiers en attachement aux différents destinataires. Je voudrais maintenant envoyer ses graphiques dans le corps du message en utilisant le fichier info ou se trouve le lien des fichiers gif.
Voici le code pour envoyer en fichier joint:
Sub EnvoieMail()
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Set OutApp = CreateObject("Outlook.Application")
For Each cell In Worksheets("Infos").UsedRange.Columns("D").Cells
Set OutMail = OutApp.CreateItem(0)
If cell.Value Like "?*@?*.?*" Then
With OutMail
.To = Cells(cell.Row, "B").Value
.Subject = Cells(cell.Row, "D").Value
.Body = "Mon text"
.Attachments.Add Cells(cell.Row, "E").Value
.Display
End With
Set OutMail = Nothing
End If
Next cell
'Set OutApp = Nothing 'it will be Nothing after End Sub
Application.ScreenUpdating = True
End Sub
Merci à tous