this code does what i want it to do. could anyone help me on how to change to attaching a worksheet instead of the entire book? also would like to have the attachment name be what the file tab name is
Sub Mail_workbook_Outlook_1()
'Working in Excel 2000-2013
'This example send the last saved version of the Activeworkbook
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
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 = [j1].Value
.CC = ""
.BCC = ""
.Subject = [c1].Value
.Body = "Dear all, " & _
vbCrLf & vbCrLf & _
"the stock model has been updated." & _
vbCrLf & vbCrLf & _
"Please find it attached for your review. " & _
vbCrLf & vbCrLf & _
"Thanks, " & _
vbCrLf & _
"Matthew"
.Attachments.Add ActiveWorkbook.FullName
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bookmarks