1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Sub EnvoiMail()
Dim destinataire, cc, body, sujet, strcommand, fichierjoint As String
destinataire1 = "tota.tata@XXX.fr,titi.toto@XXX.fr"
cc = "tutu.tete@XXX.fr,tata.tutu@XXX.fr"
sujet = "Relances"
body = "Bonjour," & vbLf & "A ce jour, et sauf erreur de notre part, nous n'avons toujours pas reçu la copie de la notification des dettes concernant votre Centre, mentionnés dans le tableau ci-joint." & vbLf & "Nous vous remercions de nous transmettre ces documents dans les meilleurs délais." & vbLf & vbLf & vbLf & "Cordialement." & vbLf & vbLf & vbLf & vbLf & "Le Service Comptabilité"
fichierjoint = "G:\CPT\Suivi des Créances\" & ActiveSheet.Name & " - " & Format(Now, "dd/mm/yyyy") & ".pdf"
strcommand = "C:\Program Files\Mozilla Thunderbird\thunderbird"
strcommand = strcommand & " -compose " & "to='" & destinataire & "'"
strcommand = strcommand & "," & "cc='" & cc & "'"
strcommand = strcommand & "," & "subject=" & sujet & ","
strcommand = strcommand & "body=" & body
strcommand = strcommand & "," & "attachment=file:///" & fichierjoint
Call Shell(strcommand, vbNormalFocus)
End Sub |
Partager