Featured Post

Three Basic Ways of Dealing with Double-Booked Resources in the Sumatra cmdlet

There are three basic ways of automatically dealing with double-booked resources in the Sumatra cmdlet suDoubleBookedMeetings. You guys wo...

Wednesday, November 15, 2006

cdoEndByDate Broken

Usually we like to report things that can get fixed. But as we've discovered, fixes to Collaboration Data Objects (CDO) just are not to be hoped for.

We were attempting to create recurring banners in Outlook using CDO server-side.

As this sample code illustrates, the error comes from CDO directly.

Set oApp = New CDO.Appointment
oApp.Configuration = iConfg
oApp.StartTime = CDate("10/4/2006 10:00:00 AM")
oApp.endtime = CDate("10/4/2006 11:00:00 AM")
oApp.Duration = 1 * 60
oApp.Location = "My Cube"
oApp.Subject = "Test: Create Meeting in VB.NET"
oApp.TextBody = "Hello..."

' Add recurring appointment
Set iRPatters = oApp.RecurrencePatterns
Set iRPatter = iRPatters.Add("Add")
iRPatter.Frequency = CDO.CdoFrequency.cdoWeekly
iRPatter.Interval = 1 ' 1 hour from 10 to 11
iRPatter.DaysOfWeek.Add (3) ' every WED
iRPatter.PatternEndDate = CDate("10/25/2006 11:00:00 AM")
iRPatter.EndType = cdoEndByDate

Our recommendation: create them as non-recurring entities and inform users if they want to make them recurring. Since Outlook does not use CDO to interface with Exchange (ever wonder why Microsoft released CDO in the first place?) that will work.

No comments: