Multiple recipients with individualized attachments

rthomas268

New Member
Joined
Jun 7, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi,
I will apologize ahead of time because I am definitely new to self-teaching myself how to do this. I need to send 50+ emails to individual recipients with an attachment that is individualized for that person. My spreadsheet is setup with FIRST NAME, LAST NAME, EMAIL, ATTACHMENT columns.
I have been researching this on the internet and YouTube videos so I will paste what I have so far. Everything worked until I put in the .Attachment.Add line - then it stops and I haven't been able to figure out how to fix it. So here it is -
Option Explicit

Sub CreateEmailsforSADonations()
Dim EApp As Object
Set EApp = CreateObject("Outlook.Application")
Dim EItem As Object
Dim path As String
path = "C:\Users\Owner\OneDrive\Documents\GBAI for 2023\2023 Silent Auction\SA DTRecipts\"
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
.To = R.Offset(0, 2)
.Subject = "2023 GBAI Silent Auction Donation Receipt"
.Attachments.Add (path & R.Offset(0, 3))
.Body = "Dear " & R & vbNewLine & vbNewLine _
& "Please find your Donation Receipt attached." _
& vbNewLine & vbNewLine & " Many Thanks" & vbNewLine & vbNewLine & _
"Ralph and Barbara Thomas"
.Display
End With
Next R

End Sub

Tried .Attachments.Add = (path & R.Offset(0, 3)), tried different wording I found online such as Addattachments. , tried inserting the (actual file path & R.Offset(0, 3)).
The Attachments path should refer to the above path and I can see it when I hover over it and the R.Offset also shows when I hover over it. Somewhere there is a bug.

Thanks for any assistance
Please be kind and write in primitive language so I will understand.

Barbara
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your sheet. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,175
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top