VBA to send outlook email to multiple recipients

Misoboii

New Member
Joined
Jun 26, 2017
Messages
25
Hi there,

I have a code here that sends an email to 1 person.
However, i do not want to hard code the email in but instead i have a list of emails in a sheet (named: control) from cell V33:V40

here is my current code:

Code:
Sub Email()

Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String


    If ActiveWorkbook.Path <> "" Then
        Set OutApp = CreateObject("Outlook.Application")
        Set OutMail = OutApp.CreateItem(0)


        strbody = "email details"


        On Error Resume Next
        With OutMail
            .to = "intern1@test.com; intern2@test.com; intern3@test.com"
            .CC = ""
            .BCC = ""
            .Subject = "Price Updates - " & Format(Date, "dd/mm/yyyy")
            .HTMLBody = strbody
            .Display   'or use .Send or .display to show in outlook wo sending
        End With
        On Error GoTo 0


        Set OutMail = Nothing
        Set OutApp = Nothing
    Else
        MsgBox "The ActiveWorkbook does not have a path, Save the file first."
    End If
End Sub

under the to =, i would like to refer to the range link in the sheet instead.

Thank you!
 
Last edited:

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
EDITS:

I have created a new sheet w all the emails.
Sheet name: emaillist
starts from row 2 onwards as row 1 is the header
 
Upvote 0

Forum statistics

Threads
1,215,526
Messages
6,125,328
Members
449,218
Latest member
Excel Master

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