Transmit Holidays Custom Form

S

Shane

I have followed the directions for
http://www.outlookcode.com/d/forms/holiday.htm and it works as
advertised. I do however get an error if I attempt to use dates that
span different years. Here is my current holiday list:

Independence Day (PUHSD Holiday)%4 Jul 2006%12:00:00 AM%5 Jul
2006%12:00:00 AM%False%False%1080%3
Labor Day (PUHSD Holiday)%4 Sep 2006%12:00:00 AM%5 Sep 2006%12:00:00
AM%True%False%1080%3
Veteran's Day (PUHSD Holiday)%10 Nov 2006%12:00:00 AM%11 Nov
2006%12:00:00 AM%True%False%1080%3
Thanksgiving (PUHSD Holiday)%23 Nov 2006%12:00:00 AM%25 Nov
2006%12:00:00 AM%True%False%1080%3
Christmas (PUHSD Holiday)%25 Dec 2006%12:00:00 AM%28 Dec 2006%12:00:00
AM%False%False%15%3
New Years (PUHSD Holiday)%1 Jan 2007%12:00:00 AM%3 Jan 2007%12:00:00
AM%False%False%15%3
Dr. Martin Luther King Jr. Day (PUHSD Holiday)%15 Jan 2007%12:00:00
AM%16 Jan 2007%12:00:00 AM%True%False%1080%3
President's Day (PUHSD Holiday)%16 Feb 2007%12:00:00 AM%17 Feb
2007%12:00:00 AM%True%False%1080%3
President's Day (PUHSD Holiday)%19 Feb 2007%12:00:00 AM%20 Feb
2007%12:00:00 AM%True%False%1080%3
Good Friday (PUHSD Holiday)%6 Apr 2007%12:00:00 AM%7 Apr 2007%12:00:00
AM%True%False%1080%3
Memorial Day (PUHSD Holiday)%28 May 2007%12:00:00 AM%29 May
2007%12:00:00 AM%True%False%1080%3

I have created a folder for appointment items that I have populated
with the holidays I want to distribute, as we are a school district, I
would like to be able to transmit all holidays for a particular school
year (July 1, 2006 - June 30, 2007). When I manually edit the holiday
list like above, I get an error when trying to run the form:

"Type Mismatch: Unable to coerce parameter value. Outlook cannot
translate you string."

When debugging, the line that breaks is line 216:

objAppt.BusyStatus = arrParams(8) objAppt.BusyStatus =
arrParams(8)
 
S

Sue Mosher [MVP-Outlook]

I'm not sure why that would be happening, but you could try forcing it to an Integer:

On Error Resume Next
objAppt.BusyStatus = CInt(arrParams(8))
On Error GoTo 0

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Shane

The error only occurs when I use dates that span multiple years! If I
set the BusyStatus to "3", then it only adds the events for 2006, not
for 2007. Any ideas?
 
S

Sue Mosher [MVP-Outlook]

Sounds like a really weird Outlook idiosyncracy. A solution might be to create two events, one for 2006 and one for 2007.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Shane

I am sorry, the individual events don't span multiple years, my school
year runs from July1 to June30, so events will be in 2006 and 2007.

I was thinking that since the script asked for a year, it may only be
able to deal with one calendar year?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top