Trying to get this macro to attach the active workbook to email sent through outlook. I can get the e-mail send (it is also sending a clip from one of the sheets as the body of the e-mail. The email sends, but will not attach the file.
Sub EmailRange()
'email specified range as the body of an e-mail
Dim WorkRng As Range
Dim Answer As String
Dim sht As Worksheet
Dim newname As String
On Error Resume Next
ActiveWorkbook.Save
Set WorkRng = Sheet5.Range("A1:F17")
Application.ScreenUpdating = False
WorkRng.Select
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Attachments.Add ActiveWorkbook.FullName
.Introduction = "Borst Daily KPI Report " & Range("A2")
.Item.To = "jeff.graser@borstauto.com;"
.Item.Subject = "Borst Daily KPI Report " & Range("A2")
.Item.Send
End With
Application.ScreenUpdating = True
End Sub
I have tried a number of ways that I have found to do this, but can't seem to get the e-mail to attach the workbook. I have tried to specify the file path and name, I have tried moving the line .attachements.add... to different places within the code. I have tried saving the workbook to another filename and then sending. No luck.