Bonjour,
Comme l'intitulé l'indique, je cherche à envoyer un mail avec thunderbird portable en VBA ACCESS 2007 avec une pièce jointe.
Le code suivant fonctionne. Thunderbird s'ouvre. Il y a bien le destinataire, le sujet et le message sauf pour la pièce jointe. Le message d'erreur est : "Le fichier E:\xxxx.PDF n’existe pas et n’a pu être joint au message."
Or le ficher est bien à cette emplacement.
J'ai regardé sur le forum sans trouver de réponse à mon problème.
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 Sub PROC10_Mail(Destinataire As String, CC As String, Sujet As String, Message As String, optional PJ As String) Dim strCommand As String strCommand = "E:\ThunderbirdPortable\ThunderbirdPortable" strCommand = strCommand & " -compose " & "to='" & Destinataire & "'" strCommand = strCommand & "," & "subject=" & Sujet & "," strCommand = strCommand & "body='" & Message & "'" if PJ<>"" then strCommand = strCommand & "," & "attachment=" & PJ end if MsgBox strCommand Call Shell(strCommand, vbNormalFocus) strCommand = "" End Sub
En vous remerciant,
Partager