+ Reply to Thread
Results 1 to 9 of 9

email with corresponding addresses and names in body AND subject using gmail

  1. #1
    Registered User
    Join Date
    12-18-2008
    Location
    Michigan
    Posts
    19

    email with corresponding addresses and names in body AND subject using gmail

    Hello everyone,

    I did search for this, but couldn't find the exact answer.

    I use gmail, and have an excel sheet with hundreds of rows. I need to send each recepient an e-mail using their e-mail address (row D), and their name in the body and subject (row A). The rest of the body of the email will all be the same.

    Thanks!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    Take a look at the following thread.
    http://www.excelforum.com/excel-prog...-formulas.html

    You'll just need to modify the code with a loop that uses the loop variable to identify the position of an email address in a list and read that value into the .To instruction in the code.

    HTH

  3. #3
    Registered User
    Join Date
    12-18-2008
    Location
    Michigan
    Posts
    19
    I'm sorry, I guess Im a little noob here, but I don't even know where to insert that code or what a loop is, or how to change the name in the e-mail that starts with "Dear <name>, .... "

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello 4thephil,

    Can you post the workbook? We can then add the macro into the workbook for you.

    Sincerely,
    Leith Ross

  5. #5
    Registered User
    Join Date
    12-18-2008
    Location
    Michigan
    Posts
    19
    I can't post the entire workbook as it is private. So, I copied and pasted the first couple of rows and changed the data, and created a new workbook. Hope this works the same? Thanks for your help!
    Attached Files Attached Files

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello 4thephil,

    I have added the macro below to the attached workbook. There is button on Sheet1 to run the macro. The draw back to sending out multiple emails is security. You will have to send each email as the macro cycles through. If I wrote the macro to use Outlook, you would be barraged by annoying dialogs with time delays. Since this is a simple text only email, It would easier and faster to use CDO (Collaboration Data Objects) to send the emails with no annoying messages. The down side of CDO is it more complex and harder to understand. I felt this code would be a good starting point.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-18-2008
    Location
    Michigan
    Posts
    19
    Wow, thank you so much for taking the time to do this. I loaded that up and clicked the button, and it immediately launched gmail with the e-mails pre-filled out. I will play around with this and tailor it to exactly what I need, but yes, this will work perfectly. Thank you for taking the time to do that! *Very impressed*

  8. #8
    Registered User
    Join Date
    01-07-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: email with corresponding addresses and names in body AND subject using gmail

    HI

    its possible change Sudject in everty mail with attachemnet.

  9. #9
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: email with corresponding addresses and names in body AND subject using gmail

    Hi, mfaisalrazzak,

    Welcome to the Forum.

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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