Macro excel envoi outlook
Fermé
Sliver92
Messages postés
1
Date d'inscription
samedi 12 avril 2008
Statut
Membre
Dernière intervention
12 avril 2008
-
12 avril 2008 à 17:07
Tarzoon - 20 avril 2008 à 16:25
Tarzoon - 20 avril 2008 à 16:25
Bonjour,
je cherche a mettre en place une relance fournisseurs. Pour cela j'ai créer un tableau excel avec la date de facture et la date d'echéance. Je souhaiterai savoir comment créer une macro pour q'une lettre de relance soit envoyer au fournisseur par mail (outlook) a la date d'échéance si le réglement n'a pas été effectué dans les délais.
Je vous remercie pour votre aide
je cherche a mettre en place une relance fournisseurs. Pour cela j'ai créer un tableau excel avec la date de facture et la date d'echéance. Je souhaiterai savoir comment créer une macro pour q'une lettre de relance soit envoyer au fournisseur par mail (outlook) a la date d'échéance si le réglement n'a pas été effectué dans les délais.
Je vous remercie pour votre aide
A voir également:
- Macro excel envoi outlook
- Telecharger macro convertir chiffre en lettre excel - Télécharger - Tableur
- Liste déroulante excel - Guide
- Word et excel gratuit - Guide
- Si et excel - Guide
- Déplacer une colonne excel - Guide
1 réponse
Salut, voici un code que j'avais trouve ya qq tps sur le net... ce qu'il te reste a faire c recuperer les differents champs a partir de ton tableau. A+
Sub bb()
Dim objEmail As Object
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "qui envoie email"
objEmail.To = "destinateur email"
objEmail.Subject = "Sujet: balbalblaba"
objEmail.TextBody = "corp du message que vous voulez envoyez"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.AddAttachment "c:\tonfichier.txt"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "Utilisateur du compte"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Mot depasse"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"smtp.mail.yahoo.fr" 'Par exemple si c'est un compte yahoo
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Fields.Update
objEmail.Send
End Sub
Sub bb()
Dim objEmail As Object
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "qui envoie email"
objEmail.To = "destinateur email"
objEmail.Subject = "Sujet: balbalblaba"
objEmail.TextBody = "corp du message que vous voulez envoyez"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.AddAttachment "c:\tonfichier.txt"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "Utilisateur du compte"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Mot depasse"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"smtp.mail.yahoo.fr" 'Par exemple si c'est un compte yahoo
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Fields.Update
objEmail.Send
End Sub