A
Al Jager
Sub SendMail()
Dim objOutlook As Object
Dim objMailItem As Object
Dim objRecipient As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(0)
Set objRecipient = objMailItem.Recipients.Add _
(ActiveSheet.Range("B2").Value)
objRecipient.Type = 1 '1 = To, use 2 for cc
objMailItem.Subject = "The extract has finished."
'Instead of the path to the file - I want to insert Active
Workbook in the next line
objMailItem.Attachments.Add _
("C:\Al Jager\! BookTest1.xls")
objMailItem.Display 'change to .Send if you don't
want to interact
End Sub
Dim objOutlook As Object
Dim objMailItem As Object
Dim objRecipient As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(0)
Set objRecipient = objMailItem.Recipients.Add _
(ActiveSheet.Range("B2").Value)
objRecipient.Type = 1 '1 = To, use 2 for cc
objMailItem.Subject = "The extract has finished."
'Instead of the path to the file - I want to insert Active
Workbook in the next line
objMailItem.Attachments.Add _
("C:\Al Jager\! BookTest1.xls")
objMailItem.Display 'change to .Send if you don't
want to interact
End Sub