1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| stAppName = "C:\Program Files\Microsoft Office\Office11\OUTLOOK.EXE"
Call Shell(stAppName, 1)
'Avant de lancer cette macro, Dans l'éditeur VBA: Faire Menu / Tools / Reference / Cocher "Microsoft Outlook Library"
Set myOlApp = CreateObject("Outlook.Application")
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 = dest
.CC = destcc
.bcc = destbcc
.Subject = suj
.Body = obj
.Attachments.Add Fic
'.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 |
Partager