toto est un entier = EmailOuvreSession("")
SI toto=0 ALORS
Erreur(EmailMsgErreur(Email.Erreur))
SINON
RepPDF est une chaîne = fRepExe()
Email.Destinataire=AdrMailClient
Email.Sujet="Commande eBizcuss N° "+NCDE1
iDestination(iPDF,RepPDF+"\Commande "+NCDE1+".PDF")
iImprimeEtat(Etat_Imp_CdesAchat,NCDE1)
Email.Attache=RepPDF+"\Commande "+NCDE1+".PDF"// Récupérer le chemin du fichier
Email.NbDestinataire=1
Email.NbAttache=1
SI PAS EmailEnvoieMessage(toto,Vrai,"IPM") ALORS
Erreur(ErreurInfo())
FIN
FIN
EmailFermeSession(toto)
SI PAS fSupprime(RepPDF+"\Commande "+NCDE1+".PDF") ALORS
Erreur(ErreurInfo())
FIN
Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=18&topic_id=5025&post_id=20734