VBA code to email multiple recipients from a list

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
915
Office Version
  1. 365
Platform
  1. Windows
Hello,

I need some help modifying this code.
for the TO portion, I need it to list each email until the end of the data.
for the body portion I need it to copy data from B1 to end of column L based on the last row of data in column B

This pic is just an example (the info goes from column B to L)
1575063564000.png

Thanks in advance for the help with this modification

VBA Code:
 Dim OutlookApp As Object, MItem As Object
  Set OutlookApp = CreateObject("Outlook.Application")
  Set MItem = OutlookApp.CreateItem(0)
  With MItem
    .to = 'go to B2 on list and continue till no more data'
    .Subject = Sheets("Automatic Emails").Range("Q1")
    .Body = Sheets("Automatic Emails").Range("Q2")& vbCrLf & vbCrLf &
'Copy data from B1 to column L (last row of data according to column B) AND
& vbCrLf & vbCrLf & vbCrLf & "[This is an Automated Message - Do not reply]" & vbCrLf & "Quality Department"
    .Display
    .Send
  End With
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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