+ Reply to Thread
Results 1 to 11 of 11

Outlook send email from data in column from excel spreadsheet

  1. #1
    Registered User
    Join Date
    01-24-2012
    Location
    Somerset, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question Outlook send email from data in column from excel spreadsheet

    Hi all

    I want to create a macro (I presume the best practice would be in outlook) which will create a new email and set the subject/message as shown in the spreadsheet (attached) and send it to the list of email addresses in column A automatically.

    Any ideas? Is outlook the best place to create the macro, or can it be done in excel.

    Thanks,
    Ben

    Example 1.xlsx

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Outlook send email from data in column from excel spreadsheet

    Try

    Please Login or Register  to view this content.
    Last edited by JieJenn; 01-31-2012 at 12:51 PM. Reason: Forgot to finish the code

  3. #3
    Registered User
    Join Date
    01-24-2012
    Location
    Somerset, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Outlook send email from data in column from excel spreadsheet

    Thank you! The macro works brilliantly, however only sends an email for the first email (A1) and doesn't email each address in each cell

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Outlook send email from data in column from excel spreadsheet

    Yeah I realized that too. I am not too familiar with outlook, but try this revision

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-24-2012
    Location
    Somerset, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Outlook send email from data in column from excel spreadsheet

    Brilliant! Works perfectly! Thank you.

    I'd also like to know what each part of the macro means, just for my own personal reference and what it is doing, would you be able to let me know, either here or via email?

  6. #6
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Outlook send email from data in column from excel spreadsheet

    Basically you're opening outlook using the macro Set OutApp = CreateObject("Outlook.Application") then creating a mail Set OutMail = OutApp.createitem(0)

    then sending the mail
    .To = cell
    .Subject = Range("C1")
    .Body = Range("C2")
    .display
    '.send (Optional)

    Then close outlook
    Set OutMail = Nothing
    Set OutApp = Nothing

  7. #7
    Registered User
    Join Date
    01-13-2012
    Location
    Somerset, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Lightbulb Re: Outlook send email from data in column from excel spreadsheet

    Thank you for all your help!

    I have modified the macro slightly to include a range of A2:A100

    Could you tell me what I need to do for the following

    IF a cell is blank, move onto the next one (not sending an email

  8. #8
    Registered User
    Join Date
    03-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Outlook send email from data in column from excel spreadsheet

    Hi,

    This thread is 99.99% of what i am after. Is there anyway to keep the Outlook sent item open prior to sending? What do I need to add to the code to make this happen rather than sending automatically?

    The reason i'd like it to stay open is to format the text as it seems to strip the formatting from the text.

    Any help would be great!

    Thank you!

  9. #9
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Outlook send email from data in column from excel spreadsheet

    Did you try the code? It doesn't actually send the email as written, just display it.
    Good luck.

  10. #10
    Registered User
    Join Date
    03-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Outlook send email from data in column from excel spreadsheet

    Yes I tested it and it does send automatically and the email is the body of the text in the word document - but it's displayed as text and stripped the formatting.

  11. #11
    Registered User
    Join Date
    08-27-2009
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Outlook send email from data in column from excel spreadsheet

    Thanks.

    Works great. 1. How would you add an attachment? and attachments changes as per email id's.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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