Sometimes when you work on bulk emailing using VBA, you have to insert attachments to the email.
In such cases, you can use the Add method under mail item to insert attachment to the email object.
Please refer the code below.
Sub AddAttachment() Dim MailItem As Outlook.MailItem Dim MailAttachments As Outlook.Attachments Set MailItem = Application.CreateItem(olMailItem) mailItem.Attachments.Add "C:\Documents\abcd.xlsx" mailItem.Display End Sub
No comments:
Post a Comment