Automated Emails from Excel RRS feed

  • Question

  • Hi,

    I am really new to using excel (computers in general actually) and I have created a database for our due dates for Tax and MOT is there a way that it can send automated emails when it gets to a month before the due date. For some reason when i pasted the info on here the county has moved across where there is no info on the MOT date

    Registration Tax Due MOT Due County
    EO09 KFJ 01/04/2016 06/06/2015 Hants
    EY09 PXG 01/04/2016 01/06/2015 Hants
    EX09 YMW 01/04/2016 01/07/2015 Hants
    HX11 ELJ 01/07/2015 30/06/2015 Hants
    LJ64MGU 01/09/2015 Kent
    HV63VUX 01/01/2016 Kent
    EO09KFG 01/03/2016 11/03/2015 Kent
    EY09PWL 01/03/2016 15/04/2015 Kent
    EY09PWN 01/03/2015 12/03/2016 Kent
    LR05LXG 01/04/2015 23/06/2015 Kent
    RV14GUX 01/04/2016 Kent
    HX11 ELH 01/07/2015 08/07/2015 Sussex
    EO09 KFK 01/04/2015 04/02/2015 Sussex
    EY09 PWU 01/03/2015 10/03/2016 Sussex
    LJ64 MGV 01/09/2015 Sussex
    HJ61 VKZ 01/10/2015 22/10/2015 Sussex
    LC14 BYV 01/06/2015 Sussex

    Friday, March 20, 2015 10:36 AM


All replies

  • You can automate Outlook Excel and schedule emails. The How to automate Outlook from another program article describes all the required steps.

    The DeferredDeliveryTime property of the MailItem class allows to set a Date indicating the date and time the mail message is to be delivered.

    • Marked as answer by L.HlModerator Monday, March 30, 2015 8:21 AM
    Friday, March 20, 2015 10:42 AM
  • Please see this link for ALL your Excel/Outlook questions.

    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Friday, March 20, 2015 2:39 PM
  • Couple of things.

    1. When you say 'database', I assume you mean 'an Excel file'. If you actually are using some database, can you provide additional details?

    2. The weird 'paste' issue you describe would be an indication that Excel expects there to be data in columns and all columns available at all times. You don't say where the data comes from and that could affect what happens when you do a copy/paste. I can duplicate the problem if I create a text file that is space delimited, copy/paste into Excel, and then do a 'text to columns' conversion. The trick is to make sure that your source data has some way to indicate that data is missing. You may need to actually put in some bogus date (like 01.Jan.9999) or if the data is somehow delimited, then remember to include a spot where the data would go. For example a comma delimited raw data row would look like:


    3. If by 'send automatically', you mean you want the system to do something without you needing to do anything (like be logged in or have the Excel file open), then Excel won't work and you need to look for a server based solution. You need something that runs 24x7 and is able to execute code on a schedule. If by 'automatic' you mean it's OK to open Excel and run a macro, then the link that points you to automating Outlook is what you want.

    Welcome to programming!

    Wednesday, March 25, 2015 10:43 AM