+ Reply to Thread
Results 1 to 4 of 4

address a new email to recipients gotton from an excel cell range

  1. #1
    Registered User
    Join Date
    04-11-2012
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    2

    address a new email to recipients gotton from an excel cell range

    Hi there,

    I have an excel spreadsheet listing contact persons in a specific column. From time to time lines will be inserted or removed.
    I would like to write a macro, that creates a new outlook mail and inserts all email addresses from that column into the recipient list.

    I know how to create emails address to a fixed amount of hard coded cells.
    What I think about is to make a selection via mouse and then start the macro which addresses to the recipients listed in the marked cells. Is that easy possible?

    thanks,

    Thomas

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: address a new email to recipients gotton from an excel cell range

    if you wish to use a selected area you can use something like this

    Please Login or Register  to view this content.
    then in your code to send the e-mail, just reference that variable in your .To section.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Registered User
    Join Date
    04-11-2012
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: address a new email to recipients gotton from an excel cell range

    thanks a lot, works great!

    I noticed, there are lots of duplicate email addresses. Is there an easy way to filter out the duplicates?
    Do I have to assign the inputs into an array instead of a string, then sort it and compare each item with the one before?
    Is there any easy trick to get this done?
    I am not really familiar with vbsscript. In unix shells there are two commands to achieve this:-)

    cheers, THomas

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: address a new email to recipients gotton from an excel cell range

    based on my experience with VBA that is how you would have to do it.. although once you have the values in an array you can use JOIN to make it into one string.

+ 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