envoi mail outlook avec vba excel
Bonjour,
Je viens de tester le code de cette discussion et j'obtiens une erreur d'application 438 sur cette ligne (propriété ou méthode non gérée par cet objet) :
Code:
1 2 3 4 5 6 7 8 9 10 11
| Dim strPath$, OutlookItem, ColAttach
Const olByValue = 1
Set OutlookItem = Application.CreateItem(0)
OutlookItem.To = "youremail@email.com"
OutlookItem.Subject = "This will work!"
OutlookItem.Body = "This works great, no warning message from Outlook!"
Set ColAttach = OutlookItem.Attachments
strPath = App.Path & "\simple.txt"
ColAttach.Add strPath, olByValue, 1, "File Attachment"
OutlookItem.Display
SendKeys "%{s}", True |
j'utilise Office 2007 et non 2000 ou 2003 comme spécifier dans le lien.
Help s'il vous plait! :)
Merci!