Sub SendEmail
()
Dim sRecipient As String
sRecipient = InputBox ("Please input the receipt email address")
Dim olApp As Object
Dim olNameSpace As Object
Dim olFolder As Object
Dim olMail As Object
Set olApp = CreateObject ("Outlook .Application")
Set olNameSpace = olApp.GetNamespace("MAPI")
Set olFolder = olNameSpace.GetDefaultFolder(6)
Set olMail = olApp.CreateItem(0)
With olMail
.Subject = "Year 2006 Revenue Chart"
.Recipients.Add sRecipient
.Body = "Workbook with chart attached"
.Attachments.Add ActiveWorkbook.FullName
.Send
End With
MsgBox ("Send OK")
End Sub
Dim sRecipient As String
sRecipient = InputBox ("Please input the receipt email address")
Dim olApp As Object
Dim olNameSpace As Object
Dim olFolder As Object
Dim olMail As Object
Set olApp = CreateObject ("Outlook .Application")
Set olNameSpace = olApp.GetNamespace("MAPI")
Set olFolder = olNameSpace.GetDefaultFolder(6)
Set olMail = olApp.CreateItem(0)
With olMail
.Subject = "Year 2006 Revenue Chart"
.Recipients.Add sRecipient
.Body = "Workbook with chart attached"
.Attachments.Add ActiveWorkbook.FullName
.Send
End With
MsgBox ("Send OK")
End Sub