Bonjour
voici le code qui fonctionne très bien, je voudrais... si ses possible qu'il envoie une demande de conrfirmation de lecture, destinataire qui a bien reçu le courrier.. pour mon courrier je fonctionne avec Windows live mail.
Sub CDO_Mail(Chemin As String, FicPDF As String)
Dim iMsg As Object
Dim iConf As Object
If Right(Chemin, 1) <> "\" Then Chemin = Chemin & "\"
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.xxxxxx.com"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = xxx
.Update
End With
With iMsg
Set .Configuration = iConf
.To = MailAdresse
.cc = "xxx@xxxxx.com"
.BCC = ""
.From = """xxxxxxxxxxxxx"" <xxx@xxxxxx.com>"
.Subject = MailSubject
.TextBody = "Veuillez trouvez ci-joint, votre facture en format PDF." & vbLf & vbLf & "Merci de votre confiance." & vbLf & vbLf & vbLf & "Si vous éprouver de la dificulter a ouvrire votre facture suivre le lien pour l'installation de Adobe Reader" & vbLf & vbLf & "http://get.adobe.com/fr/reader/" & vbLf & vbLf & vbLf & vbLf & "www.xxxxxxx.com" & vbLf & "xxxxxxxxx xxxxxxx" & vbLf & "418 931-0608" & vbLf & "xxx@xxxxxx.com"
.AddAttachment Chemin & FicPDF
.Send
End With
Kill Chemin & FicPDF
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
Merci de votre aide
bonne journée
voici le code qui fonctionne très bien, je voudrais... si ses possible qu'il envoie une demande de conrfirmation de lecture, destinataire qui a bien reçu le courrier.. pour mon courrier je fonctionne avec Windows live mail.
Sub CDO_Mail(Chemin As String, FicPDF As String)
Dim iMsg As Object
Dim iConf As Object
If Right(Chemin, 1) <> "\" Then Chemin = Chemin & "\"
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
iConf.Load -1
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.xxxxxx.com"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = xxx
.Update
End With
With iMsg
Set .Configuration = iConf
.To = MailAdresse
.cc = "xxx@xxxxx.com"
.BCC = ""
.From = """xxxxxxxxxxxxx"" <xxx@xxxxxx.com>"
.Subject = MailSubject
.TextBody = "Veuillez trouvez ci-joint, votre facture en format PDF." & vbLf & vbLf & "Merci de votre confiance." & vbLf & vbLf & vbLf & "Si vous éprouver de la dificulter a ouvrire votre facture suivre le lien pour l'installation de Adobe Reader" & vbLf & vbLf & "http://get.adobe.com/fr/reader/" & vbLf & vbLf & vbLf & vbLf & "www.xxxxxxx.com" & vbLf & "xxxxxxxxx xxxxxxx" & vbLf & "418 931-0608" & vbLf & "xxx@xxxxxx.com"
.AddAttachment Chemin & FicPDF
.Send
End With
Kill Chemin & FicPDF
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
Merci de votre aide
bonne journée