Share via

create email with attachments - attachment embedded into excel rows

Anonymous
2024-09-29T19:23:49+00:00

Below is what I am using for generating an email with an attachment where the path is contained in a cell. I would like to change this so I can embed the file into the cell instead of the path, so anyone who has the excel can generate the emails with the attachments.

Sub Create_Email_with_Attachments()

Dim EApp As Object

Set EApp = CreateObject("Outlook.Application")

Dim EItem As Object

Dim RList As Range

Set RList = Range("A2", Range("A2").End(xlDown))

Dim R As Range

For Each R In RList

Set EItem = EApp.CreateItem(0) 

With EItem 

.CC = R.Offset(0, 7) 

.Subject = R.Offset(0, 6) 

.Attachments.Add R.Offset(0, 4).Value 

.Body = R.Offset(0, 5) 

.Display 

End With 

Next R 

End Sub

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-09-30T13:42:25+00:00

    I haven't meet such situation before.

    You can refer to this article: Office VBA support and feedback | Microsoft Docs to go to Stack Overflow which is special channel to handle VBA questions.

    Hope engineer there can give you suggestions on it to send attachment with embeded file in Excel.

    Thank you for your understanding.

    Was this answer helpful?

    0 comments No comments