+ Reply to Thread
Results 1 to 5 of 5

How to attach file and send mail automatically

  1. #1
    Registered User
    Join Date
    05-26-2013
    Location
    vietnam
    MS-Off Ver
    Excel 2007
    Posts
    7

    How to attach file and send mail automatically

    Automatic send mail to Distributor.xlsxDear all,

    every month I have to send mail to distributors. Each distributor will have one sheet in the file attach, I have to copy to email and send, it take me a lot of time because the No of distributor is growing. Can anyone help me to attach each sheet in this file into the email and send it automatically after I create those files? the file I have some macro on it, so anyone can put one more VBA to attach the file and send it automatically?

    thank you very much
    Last edited by JBeaucaire; 06-12-2013 at 12:03 AM. Reason: Corrected the title, as per Forum Rules. Please take a moment to read the forum rules, link is in the menu bar above.

  2. #2
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: How to attach file and send mail automatically

    Hi..

    Add this code into Sheet1 in the VB Editor...

    Note: This assumes your Distributors names and email addresses start on row 21.

    To make it so the emails just get sent (with no preview).. change the line shown below to .Send

    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-26-2013
    Location
    vietnam
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: How to attach file and send mail automatically

    Thank you very much
    it is very helpful

    Can you help me one more time? I change the mail information into another sheet name: Mailinfo, add name in column B into subject header and delete all the active workbooks which have been created.

    As i have a limited knowledge on VBA, so I really appreciate your help

    Thank you once again
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: How to attach file and send mail automatically

    Hi..
    Changed where email info is looked for and added the Subject.
    Also.. made it Kill (delete) each file just after it creates each email..

    The attached file should do what you want..


    Am i right in thinking you manually paste the values from your "Data" sheet into the other sheets (10000198 for example)?

    If so.. you could automate that so it creates each sheet with the data you want in it and THEN emails it...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-26-2013
    Location
    vietnam
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: How to attach file and send mail automatically

    thank you very much for your great help and idea

    I have automated all so the work now is only export data from the system, edit format and run the macro. Thank once again

    I have take a long annual leave so that i could not say thank you soon.

    Best regards

+ 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