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 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| Sub Send_MsgHNY()
Set objOL = CreateObject("Outlook.Application")
Set objMail = objOL.CreateItem(olMailItem)
file_export = ActiveWorkbook.Path + "\" + ActiveWorkbook.Name
With objMail
.to = Cells(8, 6)
.CC = Cells(9, 6)
.Subject = Cells(7, 6) & " Happy New Year "
.Body = "Bonne" & _
Chr(13) & "Année" & _
Chr(13) & "2013"
.Attachments.Add file_export
.Display
End With
ActiveWorkbook.Close
Set objMail = Nothing
Set objOL = Nothing |
Partager