SendMail Automation
SendMail ( Outlook Automation )
Envoi de mails avec pièces jointes depuis VBA, en pilotant Outlook Office par automation.
Sub SendMailAutomation() Dim Ol_App As New Outlook.Application Dim Ol_Item As Outlook.MailItem Set Ol_Item = Ol_App.CreateItem(olMailItem) With Ol_Item .To = "destinataire@domaine.fr" .Subject = "L'objet du message" .Body = "Le corps du message" .Attachments.Add "F:Mes Documentsfichier.jpg" .Save .send End With Set Ol_Item = Nothing Set Ol_App = Nothing End Sub
Dernière modification : 29/07/2008 03:24
Catégorie : Les mémos - Outlook
Page lue 13869 fois