+ Reply to Thread
Results 1 to 5 of 5

Extract email address and copy into .To field

  1. #1
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69

    Extract email address and copy into .To field

    Hello,

    I currently have a workbook that I track various projects with and periodically I will need to get updates for them. I modified the following code that I found in this forum, which works pretty well.

    Please Login or Register  to view this content.
    What I haven't been able to figure out is how to extract the email address from the selected rows, which is in column J, and add it to the .To field in the email. Additionally, if I select multiple rows I would like to test if it's a duplicate address so that only 1 gets copied to the email.

    In the attached workbook you'll note that there are just names in column J. This is all I need as the exchange server will resolve the address.

    Please let me know if you require any additional information. Thanks.

    Regards,
    Chris
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69

    Re: Extract email address and copy into .To field

    I found the following from Ron de Bruin's site.

    Please Login or Register  to view this content.
    What do I need to change so that only the value of the selected row, cell J, is used?

    Chris

  3. #3
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69

    Unhappy Re: Extract email address and copy into .To field

    I'm very surprised that I haven't received a response from anyone. Could one of the forum moderators help me to understand what I might be doing wrong?

    I did note that I neglected to mention the version that I'm running.

    Excel 2003

    Outlook 2003

    I really do need assistance with this. Thanks.

    Chris

  4. #4
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69

    Re: Extract email address and copy into .To field

    I made some headway. The code in red are the changes that I made.

    Please Login or Register  to view this content.
    This adds the name of the selected row to the .To field of the email.

    I still need to figure out how to deal with multiple rows. I would like to test column J if it's a duplicate name. If it's duplicate than only add the first name and create 1 email. If the 2nd name is different than create another email and include the selected row that's associated with that name, etc.

    Additionally, I would like the header row, A8 to L8 to always be added to the email. This way I only need to select the rows of projects that I need updates for. Alternately, I don't mind selecting this row I would just want to test the cell content in column J for the word "LPM". If it finds it then the code should skip to the next cell in column J.

    I've attached the revised worksheet.

    Any ideas anyone?

    Chris
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69

    Re: Extract email address and copy into .To field

    Can anyone assist with this? I've never had no responses before so I'm a bit confused why no one has replied. Any insight would be appreciated.

    Regards,
    Chris

+ 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