+ Reply to Thread
Results 1 to 5 of 5

attach different worksheet and email them tdifferent email address through macro/vba/addin

  1. #1
    Registered User
    Join Date
    04-10-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    6

    attach different worksheet and email them tdifferent email address through macro/vba/addin

    Hi All,

    I am seeking code sample or tips to help with the following:

    Workbook 1 contains a organization and email addresses for the organization.
    Organization Email address
    0170 [email protected]
    0171 [email protected]

    Workbook2 contains a separate worksheet (worksheet name would be 0170, 0171 etc) for each organization and I have a folder on my desktop that contains files (file names would be 0170.xls, 0171.xls, etc) for each organization.

    What I am trying to do is send an email to each address in workbook 1 that contains the worksheet or file for that organization - file name or worksheet name matches the org name in workbook 1.

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,176

    Re: attach different worksheet and email them tdifferent email address through macro/vba/a

    Try this...
    youd have to tweek the code to add your folders and subject, body.

    Put this in a module in the workbook1 with the emails list.
    Add a button to the screen to run the macro: SendXlEmails

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-10-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: attach different worksheet and email them tdifferent email address through macro/vba/a

    Dear Ranman256,

    I have attached my two excel workbook. In "email" workbook I have recipients name to whom I want to email and in "Data to email" I have many worksheets in the same order as per "email" workbook. Please guide me how to email "0001" worksheet to "[email protected]" ; "0008" worksheet to "[email protected]" in one command.

    I have run your module in my "email" workbook but not able to get the result.
    I can convert/split all the worksheets into workbook with the same name.

    Please help.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,176

    Re: attach different worksheet and email them tdifferent email address through macro/vba/a

    I cannot attach the workbook for some reason. Send me an email address to send it to.

  5. #5
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,176

    Re: attach different worksheet and email them tdifferent email address through macro/vba/a

    email2.xls

    working macro.

+ 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] Email Macro to attach a non active worksheet to outlook email
    By mickgibbons1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-21-2013, 08:38 PM
  2. [SOLVED] Macro to loop through workbooks in folder and attach and email using address in closed WB
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-03-2013, 07:23 PM
  3. Email range from all worksheet with email address in cell
    By kevinarp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2012, 05:03 PM
  4. Replies: 6
    Last Post: 12-02-2011, 02:14 PM
  5. Macro doesn't automatically resolve All email address when email is drafted
    By sonny.thind in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2011, 12:58 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