Based on http://www.rondebruin.nl/mail/folder2/mail1.htm Example 1:
Option Explicit
Sub Mail_workbook_Outlook_1()
'Working in 2000-2010
'This example send the last saved version of the Activeworkbook
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = Range("A10").Value & ";" & Range("A11").Value
.CC = Range("A13").Value
.BCC = ""
.Subject = "This is the Subject line"
.Body = "Hi there"
.Attachments.Add ActiveWorkbook.FullName
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Make sure you save the workbook in which this code resides before running Mail_workbook_Outlook_1, otherwise the workbook won't be attached to the email.
Bookmarks