Oct 30 2021 08:04 PM
=HYPERLINK("mailto:"&G2&"?subject=Test Mail"&"&body=This is Test Mail","Send Emails")
I want add attachment. Is that possible?
Oct 31 2021 01:09 AM
No, the mailto: protocol does not support adding an attachment.
Oct 31 2021 08:23 AM
Is there any other way to add attachment? (Or) Suggest me any other way to send email with attach.
Using Excel 2016. VBA is Preferred.
Oct 31 2021 08:37 AM
Oct 31 2021 08:43 AM
SolutionYou can send any open workbook as attachment using the SendMail method of the Workbook object, for example:
Sub SendActiveWorkbook()
ActiveWorkbook.SendMail Recipients:="emailaddress", Subject:="Monthly Report"
End Sub
If you want to add other files, you can use Automation to send a message using Outlook. For example:
Sub SendWithAttachment()
Dim objOL As Object
Dim objMail As Object
Set objOL = CreateObject("Outlook.Application")
objOL.Session.Logon
Set objMail = objOL.CreateItem(0)
With objMail
.To = "Someone"
.CC = "Another"
.Subject = "Monthly Report"
.Body = "Please see the attached report"
.Attachments.Add "PathAndFilename"
' Use only ONE of the following two lines
.Display ' to inspect the message bedore sending it
.Send ' to send the message immediately
End With
End Sub