VB script to add Holidays in Outlook 2010

Posted on 2011-10-07
Last Modified: 2012-05-12
Just been assigned to add US and Jewish Holidays into everyone's calendar.  After doing a little Googling, I found this:

This script worked very well, but I would like to make some changes and I was hoping a VBS guru could give me a hand.  
1.  Instead of entering all of the holiday dates right underneath the dictionary object, can I make this script reference a txt file?  The file I am particularly talking about is the .hol file within Outlook.
2.  The .hol file within Outlook is in this format:
     [United States] 384
     Christmas Day,2009/12/25
     Christmas Day,2010/12/25
     [Jewish Religious Holidays] 148
Would this script read this Outlook.hol file with the syntax above, especially when the format of this Outlook.hol file is Name,Date + for the Jewish Holidays it's Name,Date(different type of calendar),Number(I am not even sure what this number represent - maybe for sort of calendar category?)
3.  I would like to also categorize this event as a Holiday within Outlook.  The script does not put the event in any type of category.  

Any help on this is greatly appreciated.

Question by:Wilmette
    LVL 51

    Expert Comment

    by:Bill Prew
    The script could be adjusted to read a text file, but the .HOL file should already be in the Outlook calendar, so not sure why you are adding them again via a script?

    LVL 51

    Expert Comment

    by:Bill Prew
    Also be aware that Microsoft makes available a standard set of holidays that you can add to Outlook without scripting, as in:


    Author Comment

    Sorry I didn't clarify.  I want to create a script that will automate the process of importing the Holidays (that we want created and imported) into all of the users' Calendar.  The user should not do anything, but maybe except just double-clicking on the script - and that's it.  Currently, the best that I can do is just double-click the modified .hol file, select the country(s) that I want imported and click OK.  I want to go beyond this - maybe just a one time double-click and all of the Holidays are imported without any further user intervention.  No user intervention is ideal.

    LVL 51

    Accepted Solution


    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Set OWA language and time zone in Exchange for individuals, all users or per database.
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now