I have this macro that email's a specific range from an actvive sheet that works perfectly until I try to add an attachment from a file path on my computer and this is where I get the 438 error. What am I doing wrong? Any help is greatly appreciated.
Code:
Sub Email_Test()
MsgBox "Email will be sent to "Blah and Blah Blah"
rspn = MsgBox("Are you sure you want to send the E-mail?", vbYesNo)
If rspn = vbNo Then Exit Sub
Sheets("TestSheet1").Unprotect Password:="123456"
' Range Selection to send
ActiveSheet.Range("E1:G9").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
'Email Details
With ActiveSheet.MailEnvelope
.Introduction = ""
'.Item.To = "Blah"
'.Item.CC = "Blah Blah"
.Item.Subject = "Test1" & Date
.Attachments.Add ("where my file path goes") '<<<<438 error
.Item.Send
End With
Sheets("TestSheet1").Protect Password:="123456"
End Sub