Sub SendMail_Outlook ()
'Avant de lancer cette macro, Dans l'éditeur VBA:
'Faire Menu / Tools / Reference / Cocher "Microsoft Outlook Library"
Dim ol As New Outlook.Application
Dim olmail As MailItem
Dim CurrFile As String
Set ol = New Outlook.Application
Set olmail = ol.CreateItem(olMailItem)
With olmail
.To = range("a3" ).value
.Subject = Range("a1" ).Value
.Body = "Contenu " & Range("a2" ).Value
.Attachments.Add "c:\data\essai.doc"
.Display '.Send
'On peut switcher entre .send et .display selon que l'on veut envoyer
'le mail (send) ou seulement le préparer et le vérifier(display)
End With
End Sub
Sub Quit_Outlook()
'Demander à Excel de Quitter Outlook
Set myOlApp = CreateObject("Outlook.Application" )
myOlApp.Quit
End Sub
ou http://www.exceltip.com/st/Control [...] l/464.html