+ Reply to Thread
Results 1 to 15 of 15

Automatic email generation

  1. #1
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Automatic email generation

    Hi Friends,

    I have a Report status in sheet1. I need a macro coding to send this report as a email from this excel to a the recepient [email protected] every month on date 25th.

    Can it be done automatically using macro.

    This macro should function even if the workbook is closed.

    Model of the excel is attached.

    Thanks,
    Saky
    Attached Files Attached Files
    Last edited by Saky; 12-06-2010 at 10:51 AM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automatic email generation from microsoft excel

    Hi Saky

    The process you describe
    send this report as a email from this excel to a the recipient [email protected] every month on date 25th.
    can be done.

    Doing so on a closed workbook that contains macros is problematic. Unless you set Security Level to low or have Digitally Signed macros, you'll need to manually enable macros for the procedure to run. To my knowledge, there's no way to do this with a program.

    John
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Automatic email generation from microsoft excel

    Hi John,

    Thanks for your reply... or else can we do this way, Create a button in the excel and assigning the email generation macro to it. So that it functions when the button is clicked.

    Can you help me...

    Saky

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automatic email generation from microsoft excel

    Hi Saky

    Yes, that can be done. I assume you're using Outlook. Is that the case? If so, check this link http://www.rondebruin.nl/sendmail.htm

    If you would like me to adapt this code for your use, let me know.

    Will the worksheet be an attachment to the email or in the body of the email? Will the filename be the same each month? What is the file name?

    John
    Last edited by jaslake; 12-03-2010 at 10:34 AM.

  5. #5
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Automatic email generation from microsoft excel

    Quote Originally Posted by jaslake View Post
    Hi Saky

    Yes, that can be done. I assume you're using Outlook. Is that the case? If so, check this link http://www.rondebruin.nl/sendmail.htm

    If you would like me to adapt this code for your use, let me know.

    Will the worksheet be an attachment to the email or in the body of the email? Will the filename be the same each month? What is the file name?

    John
    John,

    Can you kindly adapt this code from my use....because i am not tat much good in macros...Pls dont feel bad that i am asking you to do my homework..I really need your help to complete this macro...

    But the link you have sent is very informative surely i will go through it to learn email generation macros.

    I have attached my excel. In sheet1(Dashboard) i have a template with heading Project Status - Overview

    I want this template in the body of the mail. I have attached the snapshot of how my mail should look.

    I want this excel also to be attached in the mail.

    Please advice can i change the file name in the codings later if i need??
    Attached Files Attached Files

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automatic email generation from microsoft excel

    Hi Saky

    You said
    Pls dont feel bad that i am asking you to do my homework
    Do you mean "Homework" as in school work?

    John

  7. #7
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Automatic email generation from microsoft excel

    Yes... But a small change it is my office work....My boss is requesting me to do this macro...

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automatic email generation from microsoft excel

    Hi Saky

    Sorry Saky but Forum rules strictly forbid assisting with school homework. If I proceed, I could get banned from the Forum.

    If you wish too, you could PM one of the Forum Moderators and explain your situation. If they approve, either have them PM me or indicate such approval in your thread.

    Again, sorry.

    John

  9. #9
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Automatic email generation from microsoft excel

    John you misunderstood...I am an employee not a school student.

    I am creating this excel for my business purpose.. This is not a homework.... I just used the word homework because i am asking you to provide the code which i felt little guilty.

    If you have doubts just go through my excel.. I have used lot of macros on my own in the attached excel.

    So Kindly check and let me know if you could help me...

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automatic email generation from microsoft excel

    Hi Saky

    I'll proceed to work on the project and get it up and running for you. I've PM'd a Forum Moderator to look at our conversation. I'm inclined to believe you and that the "language" thing caused me to misinterpret your words.

    However, I want to make sure I don't get into hot water. I'll get back to you ASAP.

    John

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Automatic email generation from microsoft excel

    Thanks John for checking on the forum rules. Although it is policy not to provide homework answers, we can assist in leading the OP to a point where they should be able to complete the task based on your guidance....

    However, it is not possible to determine for sure that this is homework, and I guess, if it is, then we hope that the OP will actually learn from your help rather than just take it and run.

    Regards
    NBVC
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automatic email generation from microsoft excel

    Hi Saky

    Got the go ahead to proceed. I'll work on this today. Hopefully have something for you later today.

    John

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automatic email generation

    Hi Saky

    I've got this basically completed except for the attachment.

    When you say
    I want this excel also to be attached in the mail.
    do you mean just the Project Status - Overview sheet or do you mean the entire workbook?

    John

  14. #14
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automatic email generation

    Hi Saky

    I've assumed you only want to attach the Project Status - Overview sheet. The attached file appears to do as you require based on that assumption.

    You'll need to modify several lines of code in Sub Send_Mail to conform to your environment:

    Line 70 - Change this to the actual Sheet number of Progress Status - Overview
    Line 140 - Change this entire line to the actual Path and File Name of your signature. To do this, do a search on Signatures; you should find the file that has YOUR signature. Make sure it's the .htm file.
    Line 220 - insert in the parentheses the EXACT spelling in the Contact File "Display As" field of the Sender.
    Line 290 - Change this line from .Display to .Send to automatically send the Email (leave at Display while you test).

    You'll also need to set References in VBA. (Tools --> References) See the References.jpg

    The attached screen shot.jpg is what I get in running the code in Excel 2000 with Outlook 2007.

    Let me know of issues.

    John
    Attached Images Attached Images
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    11-17-2010
    Location
    India
    MS-Off Ver
    Microsoft Office Excel 2003
    Posts
    83

    Re: Automatic email generation

    Hi John,

    Thanks is a very small word to convey for the help you have done to me...Thank you sooooo much for your help dude...
    This code works great and it satisfied my full requirement...Again thanks for your precious time and effort you have put in....

    Thanks a ton

+ 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