+ Reply to Thread
Results 1 to 12 of 12

Automatic email reminders based on different deadlines on Excel

  1. #1
    Registered User
    Join Date
    08-24-2015
    Location
    Singapore
    MS-Off Ver
    2007, 2013, 2016
    Posts
    20

    Lightbulb Automatic email reminders based on different deadlines on Excel

    Hi guys,

    I'm new to this forum and new to Excel VBA as well. Hope to seek some answers to my problems!

    I have a list of employees on my Excel and the list is used to track who have submitted their signed copy of documents. I was hoping I could type a VBA that could send 3 different emails automatically - 1 on the due date, 1 four weeks after, and 1 ten weeks after. The emails content are different and could be Cc'ed to other email address. The sending of emails would stop once the column of "Form Status" is noted as "Completed". I'm using Outlook btw.

    I would appreciate any help. Thanks!

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Automatic email reminders based on different deadlines on Excel

    there are plenty of previous examples of this on this forum of which you can draw from

    here's one i did some time ago which is very similar to your issue
    http://www.excelforum.com/excel-prog...xcel-file.html
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    08-24-2015
    Location
    Singapore
    MS-Off Ver
    2007, 2013, 2016
    Posts
    20

    Re: Automatic email reminders based on different deadlines on Excel

    Hi humdingaling,

    Thanks for the help. Sorry I took long as I was looking through the code trying to make sense of it since I'm new to VBA. I tried your solution but i'd probably required a few more additions. Also I made some changes to the VBA, not sure if it made sense though.

    1. The first email sends on the date of Column D, with the message, but also with an attachment (is that possible?).
    2. The second email sends on the date of Column G, if the job status is still incomplete, as per Column F. Email is sent to address on Column B and cc's address on Column C.
    3. The third email sends on the date of Column I, if the job status is still incomplete, as per Column F. Email is sent to a specific email address, say [email protected]

    thanks alot.
    yawwwn
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Automatic email reminders based on different deadlines on Excel

    do your 3 types of email overlap? if not there you dont need to seperate the macro into 3 chucks like you have

    ie would you send 1st 2nd and 3rd type of email all at the same time?
    the way you describing it doesnt sound like it
    as D is start date
    G is 4 weeks in
    I is 10 weeks in
    so they sound be mutually exclusive

    im also assuming your columns E,J and H are checks
    ie...if you have sent an email you wont continuously email every time you open the workbook is that correct?
    or if you haven't opened file in few days it counts back as well?
    Last edited by humdingaling; 08-26-2015 at 11:07 PM.

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Automatic email reminders based on different deadlines on Excel

    see attached
    i made it .display instead of .send
    you really shouldn't do .send unless its final

    re: attachment
    left blank space with comment in there for you
    read this site for how to do it
    http://www.rondebruin.nl/win/s1/outlook/amail1.htm
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-24-2015
    Location
    Singapore
    MS-Off Ver
    2007, 2013, 2016
    Posts
    20

    Re: Automatic email reminders based on different deadlines on Excel

    Oh so the macro now is that it would send all 3 at the same time?

    How i was expecting is:
    on the date of Column D, the email would be sent, together with an attachment. If i got an reply from the recipient thereafter, I would select "Completed" in F. If not, it would still be "Incomplete"
    Then, by G, if it is still "Incomplete", the email would be sent again....then subsequently by I, if it is still "Incomplete", the email would be sent again.

    Yes E,J,H are checks to show when the email was sent. Yes, if I have sent an email, it won't continuously email everytime I open the workbook; just once. Can the email be sent regardless I open the workbook or not?
    Does the email send at random times on the particular date it's supposed to send?

    Thanks & Regards,
    yawwwn

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Automatic email reminders based on different deadlines on Excel

    ive restructured your loop so it checks every row just once

    firstly for completed...if its completed goto next row
    then it checks the date so see where it should slot in then on the cell next to date to see if that cell is empty
    if it is empty then send email otherwise it assumes email has been already sent previously

    Can the email be sent regardless I open the workbook or not?
    no, this is not possible
    you are required to open the workbook to trigger the effect

    Does the email send at random times on the particular date it's supposed to send?
    no it tries to send when you open the workbook
    so if you open workbook...send email and dont save...it will try email same email again
    so remember to save on exit

  8. #8
    Registered User
    Join Date
    08-24-2015
    Location
    Singapore
    MS-Off Ver
    2007, 2013, 2016
    Posts
    20

    Re: Automatic email reminders based on different deadlines on Excel

    hey thanks mate, just to check, does it send email automatically from the email account that is registered in the outlook of the computer the file is in?
    Meaning like if I run the VBA, it will automatically open the Outlook client of the computer and send, and if I transfer the file to another computer, it will send with the email address of the outlook client of another computer?

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Automatic email reminders based on different deadlines on Excel

    it uses the "default" outlook account on the computer than runs the code
    so if outlook is not installed on that computer it will not work
    if you are going to use this on other computers/setups i would suggest testing the water first with macro that is manually run instead of automatically just in csae

    if you have more than one and you want to check or change account
    http://www.rondebruin.nl/win/s1/outlook/account.htm

    if you havent noticed already i refer to Ron's website a lot when dealing with VBA email (also great for other code but especially for Email)

  10. #10
    Registered User
    Join Date
    08-24-2015
    Location
    Singapore
    MS-Off Ver
    2007, 2013, 2016
    Posts
    20

    Re: Automatic email reminders based on different deadlines on Excel

    alright! thanks so much man for all the help. Will go explore and figure it out. Should work out fine. Cheers!

  11. #11
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Automatic email reminders based on different deadlines on Excel

    not a problem

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  12. #12
    Registered User
    Join Date
    08-24-2015
    Location
    Singapore
    MS-Off Ver
    2007, 2013, 2016
    Posts
    20

    Re: Automatic email reminders based on different deadlines on Excel

    Hey mate, my apologies, just one last question:

    I tried the macros and it works brilliantly. Except when the email is sent, apart from the generating out the reminder detail in Column E, it also automatically changes column F to "Completed", which should not be the case.

    The "Completed" should be selected by the user manually and by doing so, will prevent further email sent.

    EDIT:
    Alright, I found out why! I just removed this line

    End with

    Cells (i,6) = "Completed"

    Thanks!
    Last edited by yawwwn; 08-27-2015 at 03:17 AM.

+ 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. Automatic e-mail reminders using VBA&Excel
    By Alex3260 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2015, 09:26 AM
  2. Replies: 0
    Last Post: 06-28-2014, 09:31 AM
  3. Automatic email from Lotus notes based on the due dates in excel
    By vijendraydv in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-23-2014, 12:50 AM
  4. Automatic email based on excel sheet cell value
    By caf20012 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2014, 05:55 AM
  5. Auto sending email reminders to clients from excel
    By HGV in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-27-2014, 11:33 AM
  6. Automatic email from excel based on due date
    By AmishJPatel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2012, 04:58 PM
  7. Automatic Email from Excel based on Date in Cell
    By cyee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-25-2011, 06:04 AM

Tags for this Thread

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