+ Reply to Thread
Results 1 to 8 of 8

Send email as To address to all email id stored in excel

Hybrid View

santbiju1 Send email as To address to... 11-04-2015, 09:16 AM
peterjuhnke Re: Send email as To address... 11-04-2015, 09:36 AM
mainemojo Re: Send email as To address... 11-04-2015, 09:37 AM
6StringJazzer Re: Send email as To address... 11-04-2015, 11:20 AM
santbiju1 Re: Send email as To address... 11-05-2015, 03:03 AM
Obsessed Re: Send email as To address... 11-04-2015, 09:38 AM
santbiju1 Re: Send email as To address... 11-04-2015, 09:51 AM
Obsessed Re: Send email as To address... 11-04-2015, 10:00 AM
  1. #1
    Registered User
    Join Date
    05-18-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2013
    Posts
    31

    Send email as To address to all email id stored in excel

    Hi

    i have an excel file having as per below

    Name email id
    =================
    AAA AAA@1234.com
    BBB BBB@1234.com
    CCC CCC@1234.com
    DDD DDD@1234.com

    My requirement is if i open the outlook and after typing the matter and press send button i want to send the same email to all the address separately which is the excel file and the address should be in To address .

    The name also should display at the beginning of the email content

    ie Dear AAAA or Hi AAAA

    <Content>

    is it possible to do ie to send email to bulk of employees

  2. #2
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Kalgoorlie Australia
    MS-Off Ver
    Excel 2007/10
    Posts
    251

    Re: Send email as To address to all email id stored in excel

    I send many emails separately by doing this, I simply copy the addresses from excel and paste them into the BCC address bar, this way each player (player in my case; employer in your case)gets the same email. I think outlook has a maximum of 100 or120 addresses. Gmail is a lot higher; I'll send out to 250 or more email addresses with the one letter.
    Getting the name in the start, well sorry in can't help with that.
    Peter

  3. #3
    Forum Contributor
    Join Date
    07-01-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2016
    Posts
    161

    Re: Send email as To address to all email id stored in excel

    Try this code. This is assuming you have names in column A and email addresses in column B.

    Sub SendEmail()
        Dim OutApp As Object
        Dim OutMail As Object
        Dim cell As Range
    
        Application.ScreenUpdating = False
        Set OutApp = CreateObject("Outlook.Application")
    
        On Error GoTo cleanup
        For Each cell In Columns("B").Cells.SpecialCells(xlCellTypeConstants)
            If cell.Value Like "?*@?*.?*" Then
    
                Set OutMail = OutApp.CreateItem(0)
                On Error Resume Next
                With OutMail
                    .To = cell.Value
                    .Subject = "Reminder"
                    .Body = "Dear " & Cells(cell.Row, "A").Value _
                          & vbNewLine & vbNewLine & "PUT YOUR EMAIL BODY IN HERE"
                    '.Attachments.Add ("C:\test.txt")  Delete this and uncomment to send an attachment
                    .Send
                End With
                On Error GoTo 0
                Set OutMail = Nothing
            End If
        Next cell
    
    cleanup:
        Set OutApp = Nothing
        Application.ScreenUpdating = True
    End Sub

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,739

    Re: Send email as To address to all email id stored in excel

    Quote Originally Posted by mainemojo View Post
    Try this code.
    mainemojo, include attribution if you provide code taken from another source.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Registered User
    Join Date
    05-18-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2013
    Posts
    31

    Re: Send email as To address to all email id stored in excel

    Hi,

    Thank you , its working,

    More queries

    1. is it possible that if i write all the body part in outlook 2013 and send emails from the excel list.
    2. if my outlook 2013 is having 3 email ,how can i select the email id for sender.

    Thank You

  6. #6
    Forum Contributor Obsessed's Avatar
    Join Date
    05-22-2013
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 365
    Posts
    215

    Re: Send email as To address to all email id stored in excel

    Assuming you have headers:

    A1: Employee Name
    B1: Employee Email
    C1: Subject
    D1: Salutation
    E1: Body

    You can use this:

    Sub SendMail()
    Dim OutApp As Object, OutMail As Object
    Dim Body As String, Subject As String, Salutation As String, EmployeeName As String, EmployeeEmail As String
    Dim LastEmployee As Long, Employee As Long
    
    Application.ScreenUpdating = False
    Set OutApp = CreateObject("Outlook.Application")
    
    LastEmployee = ActiveSheet.Range("A" & ActiveSheet.UsedRange.Rows.Count + 2).End(xlUp).Row
    If LastEmployee = 1 Then
        MsgBox ("No Employees in List")
        Application.ScreenUpdating = True
        Exit Sub
    End If
    
    Subject = Range("C2").Value
    Salutation = Range("D2").Value
    Body = Range("E2").Value
    
    For Employee = 2 To LastEmployee
        EmployeeName = Cells(Employee, 1)
        EmployeeEmail = Cells(Employee, 2)
        Set OutMail = OutApp.CreateItem(0)
        With OutMail
            .To = EmployeeEmail
            .Subject = Subject
            .Body = Salutation & " " & EmployeeName & "," & vbNewLine & vbNewLine & Body
            .Send
        End With
        Set OutMail = Nothing
    Next Employee
    
    Set OutApp = Nothing
    Application.ScreenUpdating = True
            
    End Sub
    Want to show appreciation for the help you received from a member? Give them reps by clicking the bottom left of their post!

  7. #7
    Registered User
    Join Date
    05-18-2015
    Location
    Saudi Arabia
    MS-Off Ver
    2013
    Posts
    31

    Re: Send email as To address to all email id stored in excel

    Hi all,

    Where i have to write the body and subject.
    can you attach a sample excel file.

    Thank you

  8. #8
    Forum Contributor Obsessed's Avatar
    Join Date
    05-22-2013
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 365
    Posts
    215

    Re: Send email as To address to all email id stored in excel

    Here you go.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to send an email to more that one email address in the same row
    By eddyrcabrera79 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-26-2015, 08:51 AM
  2. [SOLVED] Send an Excel with Outlook using VBA and Select an email address from a cell
    By TNT Innight in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-09-2015, 10:58 AM
  3. VBA code to send email to the people whose email address is in the Access table
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-30-2014, 05:11 AM
  4. Replies: 6
    Last Post: 12-02-2011, 02:14 PM
  5. send email from XL list of email address
    By pauluk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2009, 11:36 AM
  6. macro to send excel sheet to specific email address
    By JonnieP in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2005, 06:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1