• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1247
  • Last Modified:

Automating the distribution of a company Outlook.hol file to all users.

We want to be able to use outlook.hol to post company events and holidays.  We can edit the file and make it available to all of our users, but my question is this:

Since this file will require periodic updates throughout the year, is there away we can automate the distribution and the subscription to the file?  Perhaps use a GPO to push out the file and/or do the Tools>Options>Calendar Options>Add Holidays>Click on the appropriate category and OK?

  • 3
  • 3
1 Solution
David LeeCommented:
Hi dmbonilla4,

I'm not sure this is going to work the way you may be thinking.  Adding holidays to a calendar is a one-way process.  There is no synchorization or updating.  If you a Company Picnic on May 1st, and then it changes, each employee would have to remove the first entry and then add the second entry.  If you run a holiday file multiple times it adds multiple entries, it doesn't adjust the existing entries.

dmbonilla4Author Commented:
Thank you for the info BlueDevilFan (they disappointed me in the NCAA Tourney, as I'm sure you were too).  I understand the problem with changing a scheduled event but, if we add an event between two others, would the first two events be duplicated when the holiday file is run the second time? Thanks again.
dmbonilla4Author Commented:
Thank you again BDF.  I've got what I need.
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

David LeeCommented:
You're welcome.  Yes, I was very disappointed.  To asnwer your question, yes, if you inserted event C between events A and B and ran the file again you'd end up with 1 C and 2 each A and B.  I was going to offer an alternative to using .hol files using a bit of VBScripting.  Let me know if you're interested in that.
dmbonilla4Author Commented:
I am always interested in alternatives.  Please educate me.  Thank you.
David LeeCommented:
I wrote the script below to allow staff to add events like pay period starting and ending dates, company functions, etc. to their calendars.  The script reads a file containing one event per line in the form EVENT NAME:EVENT DATE.  The script could be modified to check for the existence of a given appointment and update it if it is found, or add it if it isn't.  The script and data file can be placed on a network share or a web site and employees sent a link.  All they have to do is click on the link.  When they do the script runs and modifies their calendar.

Dim olkApp, olkCalendar, olkEvent, objFSO, objFile, arrItem, strFilename
strFilename = WScript.Arguments(0)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFilename)
Set olkApp = CreateObject("Outlook.Application")
Set olkCalendar = olkApp.GetNamespace("MAPI").GetDefaultFolder(9)
Do While Not objFile.AtEndOfStream
    arrItem = Split(objFile.ReadLine, ":")
    Set olkEvent = olkApp.CreateItem(1)
    olkEvent.Subject = arrItem(0)
    olkEvent.Start = arrItem(1)
    olkEvent.AllDayEvent = True
    olkEvent.ReminderSet = False
Set olkEvent = Nothing
Set olkCalendar = Nothing
Set olkApp = Nothing
Set objFile = Nothing
Set objFSO = Nothing
WScript.Echo "Events Added"

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now