Trying to add a file to a mail VBA, but I keep getting an error.
My code:
Sub MAIL()
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "Hello,"& vbNewLine & vbNewLine & "Hereby I send you this file."
.Item.To = "john.doe@gmail.com"
.Item.Subject = "Daily file"
.Attachments.Add ("C:\Users\Admin\Desktop\Daily file.pdf")
End With
End Sub
Error reads:
Run-time error '438': Object doesn't support this property or method
What can I do to get past this?