Platform SDK: CDO 1.2.1 |
The AllDayEvent property indicates whether this appointment is an all-day or multiple-day event. Read/write.
objAppointment.AllDayEvent
Boolean
The AllDayEvent property contains True if the appointment takes up one or more entire days in the calendar without any free blocks. It contains False if the appointment is limited to a specified start time and a duration that is not a multiple of 24 hours.
If you change AllDayEvent from False to True, the appointment's StartTime is automatically reset to the midnight (00:00) preceding the current starting date/time, and EndTime is reset to the midnight following the current ending date/time. The resulting Duration is a nonzero multiple of 24 hours. If the appointment underlies a meeting, these calculations are performed in the current time zone of the appointment's organizer.
If you subsequently change StartTime or EndTime, you are not required to set them to midnight, but you must set them to the same time of day, such that their values differ by a nonzero multiple of 24 hours. If you do not comply with this restriction while AllDayEvent is True, you get a return of CdoE_INVALID_OBJECT when you call the appointment's Update method.
If you change AllDayEvent from True to False, the appointment's StartTime is automatically reset to the current value of the "BusinessDayStartTime" option on the current starting date, and EndTime is reset to 30 minutes past "BusinessDayStartTime" on the current ending date. Thus the appointment still covers the same number of days as it did before. The "BusinessDayStartTime" option can be obtained from the Session object's GetOption method and altered with the SetOption method. If AllDayEvent was already False, StartTime and EndTime are not modified.
If an appointment is viewed through Microsoft Schedule+ and its StartTime and EndTime are a multiple of 24 hours apart, its AllDayEvent property is forced True by Schedule+. The starting and ending times are not changed.
If you make this appointment recurring by calling its GetRecurrencePattern method, its StartTime, EndTime, and AllDayEvent properties are disabled, and any attempt to access them returns CdoE_NO_SUPPORT. Calling ClearRecurrencePattern returns the appointment to nonrecurring status, and these properties can once again be accessed. However, their values may have changed if the corresponding properties on the RecurrencePattern object were edited while the appointment was recurring.
Calendar folders are not supported in the public folders store provided with Microsoft® Exchange, and AppointmentItem objects are stored as Message objects. An attempt to read or write AllDayEvent in this case returns CdoE_NO_SUPPORT.
Changes you make to properties on an AppointmentItem object take effect when you call the Send or Update method.