search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Day/Week Event Calendar All Day Events with Exchange Web Services

Asked by Patrick Brice
7 years ago.

What is the DataAllDayField value when using Exchange Web Services?

Answer posted by Dan Letecky [DayPilot]
7 years ago.

You can use IsAllDayEvent property:

DataAllDayField = "IsAllDayEvent"

See also:
https://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.appointmentschema.isalldayevent(v=exchg.80).aspx

Comment posted by Patrick Brice
7 years ago.

Thanks Dan!

I have tried that but I get the error "Property accessor 'IsAllDayEvent' on object 'Microsoft.Exchange.WebServices.Data.Appointment' threw the following exception:'You must load or assign this property before you can read its value.'"

Comment posted by Patrick Brice
7 years ago.

Okay never mind, I just realized that the AppointmentSchema.IsAllDayEvent was not being loaded as a part of the CalendarView PropertySet. For those having this same issue using Exchange Web Services be sure to add AppointmentSchema.IsAllDayEvent to your CalendarView PropertySet when loading your appointments:

Dim calendar As CalendarFolder = FindDefaultCalendarFolder()

Dim cView As New CalendarView(startDate, endDate, 50)

cView.PropertySet = New PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End, AppointmentSchema.Id, AppointmentSchema.IsAllDayEvent) '<=== Make sure you add "AppointmentSchema.IsAllDayEvent"

Dim appointments As FindItemsResults(Of Appointment) = calendar.FindAppointments(cView)

Comment posted by Dan Letecky [DayPilot]
7 years ago.

Great, thanks for the update!

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.