
Set objNamespace = objOutlook.GetNamespace("MAPI") Set objOutlook = CreateObject("Outlook.Application")
'Wscript.echo "Importing 2017 Company Holidays."+ CRLF + CRLF + "Press OK to Continue."
(If you want users to double click on a file to run, use the. vbs file and call it from a logon script. You can use a script to import holidays into your calendar. If Outlook is not on top of the screen, switch to it.
On separate lines under the header, enter the events, one per line in. Tip: you can work with the dates in Excel, then copy and paste into Notepad to save as an HOL file. To create a custom set of holidays, you can create your own HOL file in notepad by following these steps. On each holiday line, there is a comma and space between the holiday description (subject) and the date. Note that there is a space between the bracket and the number. The # is the total number of holidays listed for the location (or country). The Outlook.HOL file lists holidays in the following format, one date per line: You do not have to go to Options > Calendar > Add Holidays to add the holidays to your calendar. This has one advantage: you only need to double click on the file to open the Add Holidays dialog. #Just calendar 2017 how to#
See How to Remove Duplicate Holidays From the Calendar for complete instructions.Ĭreate a Custom Holiday File | Use a Script to Import Holidays | Move Events Manually | Custom HOL sample | More Informationīecause of tighter security in current versions of Windows, it's generally easier to create a new HOL file.