Email from excel list

Shadeslayers09

New Member
Joined
Nov 30, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

I am wondering if there is a way to setup some type of macro/script that will allow me to send individual emails to a list of emails that i have on a spreadsheet. With my job as an estimator for a GC, i have to send out invites to subcontractors as well as any answered RFI's or addendums, and would like to have a button for each option that will allow me to create a unique email for each subcontractor but only pressing one button.

For instance, when i send out the Invitation to Bid (ITB), after I press the button, it would ask if i want to send it out to everyone or just certain ones (if certain ones then it would ask me to select the cells). After i make that choice it would then ask what i want the subject line to be (if able to setup a code to auto-pull from certain cells that would be great) and then what i want the body of the email to say.

If anyone could help me out that would be great.

Thanks!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
This is one option :

Download workbook : Multi Emails.xlsm

VBA Code:
Option Explicit

Sub Send_Email()

    Dim c As Range
    Dim strBody As String
    Dim OutLookApp As Object
    Dim OutLookMailItem As Object
    Dim i As Integer
    On Error Resume Next
    
    
    For Each c In Range("G2:G100")
    strBody = "Greetings : " & c.Offset(0, -6).Value & "<br></br><br></br>" _
                & c.Offset(0, -2).Value & "<br></br><br></br><br></br>" _
                & "Sincerely, " & "<br></br><br></br>" _
                & "Your Signature Here"
                
    
        If c.Value <> "" Then
            Set OutLookApp = CreateObject("Outlook.application")
            Set OutLookMailItem = OutLookApp.CreateItem(0)
            With OutLookMailItem
                    .To = c.Offset(0, -5).Value
                    .CC = c.Offset(0, -4).Value
                    .Subject = c.Offset(0, -3).Value
                    .HTMLBody = strBody   'c.Offset(0, -2).Value
                    .Attachments.Add c.Offset(0, -1).Value
                    .Display
                    '.Send
            End With
        End If
    Next c

End Sub

Sub clrSend()
    Range("G2:G100").Value = ""
End Sub

Keep in mind the above project does not do everything you are seeking but it is a good start that can be added on to.
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,666
Members
448,977
Latest member
moonlight6

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