Of course, R5 is going to obsolete this, but those folks planning on hanging onto R4.x systems for a while, occaisionally you want to distribute company wide events.
We programmed a button and sent it to our division in an email. The button contained the code below, and the email contained the following:
The Holidays for the division for 1999 have been announced. The button at the bottom of this memo will add the holidays to your personal calendar in Notes. Clicking the button below will present you with three options.
YES - Add all the 'official' Akron holidays, plus add 'informational' holidays (Valentines day, Easter, Passover, etc). The 'informational' holidays are added in such a way that they do not block time on your schedule.
NO - Add only the 'official' Akron holidays.
CANCEL - Exit and return to this note without adding any holidays.
NOTE: Because the entries do not take time on the freetime calendar, I did no checking of any kind to see if the entry was a duplicate. This runs fairly quickly, and we didn't want to consume run time on the user's client!
Sub Click(Source As Button)
Dim RealHolidays(1,11) As String
Dim InfoHolidays(1,23) As String
Dim flag As Integer
RealHolidays(0,0) = "1/1/99"
RealHolidays(1,0) = "New Year's-National"
RealHolidays(0,1) = "4/2/99"
RealHolidays(1,1) = "Good Friday-Local"
RealHolidays(0,2) = "5/31/99"
RealHolidays(1,2) = "Memorial Day-National"
RealHolidays(0,3) = "7/5/99"
RealHolidays(1,3) = "Independence Day-National"
RealHolidays(0,4) = "7/6/99"
RealHolidays(1,4) = "Day After Independence Day-Local"
RealHolidays(0,5) = "9/6/99"
RealHolidays(1,5) = "Labor Day-National"
RealHolidays(0,6) = "11/25/99"
RealHolidays(1,6) = "Thanksgiving Day-National"
RealHolidays(0,7) = "11/26/99"
RealHolidays(1,7) = "Day after Thanksgiving-Local"
RealHolidays(0,8) = "12/23/99"
RealHolidays(1,8) = "Day in Lieu of Christmas Day"
RealHolidays(0,9) = "12/24/99"
RealHolidays(1,9) = "Christmas Eve-Local"
RealHolidays(0,10) = "12/30/99"
RealHolidays(1,10) = "Day in Lieu of New Year's Day"
RealHolidays(0,11) = "12/31/99"
RealHolidays(1,11) = "New Year's Eve-Local"
InfoHolidays(0,0) = "1/18/99"
InfoHolidays(1,0) = "INFO - ML King Day"
IfoHolidays(0,1) = "2/14/99"
InfoHolidays(1,1) = "INFO - St. Valentine's Day"
InfoHolidays(0,2) = "2/15/99"
InfoHolidays(1,2) = "INFO - President's Day"
InfoHolidays(0,3) = "2/17/99"
InfoHolidays(1,3) = "INFO - Ash Wednesday"
InfoHolidays(0,4) = "3/1/99"
InfoHolidays(1,4) = "INFO - Purim"
InfoHolidays(0,5) = "3/17/99"
InfoHolidays(1,5) = "INFO - St. Patrick's Day"
InfoHolidays(0,6) = "3/28/99"
InfoHolidays(1,6) = "INFO - Palm Sunday"
InfoHolidays(0,7) = "3/31/99"
InfoHolidays(1,7) = "INFO - Passover"
InfoHolidays(0,8) = "4/4/99"
InfoHolidays(1,8) = "INFO - Easter"
InfoHolidays(0,9) = "4/4/99"
InfoHolidays(1,9) = "INFO - DST Begins"
InfoHolidays(0,10) = "4/21/99"
InfoHolidays(1,10) = "INFO - Secretaries Day"
InfoHolidays(0,11) = "5/9/99"
InfoHolidays(1,11) = "INFO - Mothers Day"
InfoHolidays(0,12) = "6/14/99"
InfoHolidays(1,12) = "INFO - Flag Day"
InfoHolidays(0,13) = "6/20/99"
InfoHolidays(1,13) = "INFO - Fathers Day"
InfoHolidays(0,14) = "9/11/99"
InfoHolidays(1,14) = "INFO - Rosh Hashanah"
InfoHolidays(0,15) = "9/20/99"
InfoHolidays(1,15) = "INFO - Yom Kippur"
InfoHolidays(0,16) = "10/11/99"
InfoHolidays(1,16) = "INFO - Columbus Day"
InfoHolidays(0,17) = "10/16/99"
InfoHolidays(1,17) = "INFO - Bosses Day"
InfoHolidays(0,18) = "10/31/99"
InfoHolidays(1,18) = "INFO - Halloween"
InfoHolidays(0,19) = "10/31/99"
InfoHolidays(1,19) = "INFO - DST Ends"
InfoHolidays(0,20) = "11/11/99"
InfoHolidays(1,20) = "INFO - Veteran's Day"
InfoHolidays(0,21) = "10/16/99"
InfoHolidays(1,21) = "INFO - Sweetest Day"
InfoHolidays(0,22) = "12/4/99"
InfoHolidays(1,22) = "INFO - Hanukkah"
InfoHolidays(0,23) = "12/26/99"
InfoHolidays(1,23) = "INFO - Kwanzaa"
flag = Messagebox("Do you want 'info only' holidays added (i.e. Valentine's day, etc)?" _
& " They will not take up freetime on your schedule if added." _
& " Click 'YES' to include them, 'NO' to only add the Goodyear 'time off' holidays, " _
& "'CANCEL' to exit without adding any holidays." _
, (3 + 32), "Holiday Choices")
If (flag = 2) Then 'CANCEL button
Exit Sub
Elseif (flag = 7) Then ' NO button
flag = False
Else
flag = True
End If
Call AddCalEntry(RealHolidays, True)
If (flag = True) Then Call AddCalEntry(InfoHolidays, False)
rint ""
End Sub
Sub AddCalEntry(Dates() As String, flag As Integer)
Dim session As New NotesSession
Dim db As NotesDatabase
This was first published in November 2000