Bonjour,
La macro ci-dessous fonctionne parfaitement pour l'envoie de mails automatiques d'Excel 2003 vers Outlook 2003. Ayant récemment installé Outlook 2010, celle-ci ne fonctionne plus et m'affiche le message suivant quand j'essaye d'envoyer un mail :
Erreur execution 13
Incompatibilité de type
Comment puis-je mettre à jour cette ligne de codes ?
Sub SendMail()
Dim ol As New Outlook.Application
Dim OLMail As MailItem
Dim CurrFile As String
Dim chemin$, Client$, Fichier$
Set ol = New Outlook.Application
Set OLMail = ol.CreateItem(olMailItem)
With OLMail
.To = …
.Subject = …
.HTMLBody = …
& "" & recuptxt("C:\Documents and Settings\Administrateur\Bureau\ \Signature.html")
.Display
End With
End Sub
Merci par avance pour votre aide....
Benoit
La macro ci-dessous fonctionne parfaitement pour l'envoie de mails automatiques d'Excel 2003 vers Outlook 2003. Ayant récemment installé Outlook 2010, celle-ci ne fonctionne plus et m'affiche le message suivant quand j'essaye d'envoyer un mail :
Erreur execution 13
Incompatibilité de type
Comment puis-je mettre à jour cette ligne de codes ?
Sub SendMail()
Dim ol As New Outlook.Application
Dim OLMail As MailItem
Dim CurrFile As String
Dim chemin$, Client$, Fichier$
Set ol = New Outlook.Application
Set OLMail = ol.CreateItem(olMailItem)
With OLMail
.To = …
.Subject = …
.HTMLBody = …
& "" & recuptxt("C:\Documents and Settings\Administrateur\Bureau\ \Signature.html")
.Display
End With
End Sub
Merci par avance pour votre aide....
Benoit