Platform SDK: CDO 1.2.1 |
The Duration property returns the duration of the recurring appointment in minutes. Read-only.
objRecurPatt.Duration
Long
The Duration property contains the number of minutes the appointment is to last every time it recurs. Duration is always valid on a newly created RecurrencePattern object and defaults to the value of the Duration property of the AppointmentItem object that created this recurrence pattern.
The minimum value of Duration is 0. The maximum value allows an appointment to last until its next possible recurrence, and is dependent on the settings of the RecurrenceType, Interval, and DayOfWeekMask properties, as follows:
RecurrenceType setting | Maximum Duration value |
---|---|
CdoRecurTypeDaily | (1 day) x (Interval value) |
CdoRecurTypeMonthly CdoRecurTypeMonthlyNth |
(28 days) x (Interval value) |
CdoRecurTypeYearly CdoRecurTypeYearlyNth |
336 days, that is, 48 weeks, since Interval cannot be greater than 1 for yearly recurrence types |
CdoRecurTypeWeekly, and DayOfWeekMask specifies exactly one day per week |
(7 days) x (Interval value) |
CdoRecurTypeWeekly, and DayOfWeekMask specifies more than one day per week |
the minimum difference between any two days specified in the mask, for example 3 days if the mask specifies CdoMonday and CdoFriday |
Among its possible values, the Duration property can be any multiple of 24 hours that does not exceed its maximum value. If an occurrence has such a value for Duration, Microsoft® Schedule+ interprets it as lasting exactly 24 hours. That is, Schedule+ treats Duration values of 0, 1440, 2880, 4320, and so on as if they were 1440.
Changes you make to properties on a RecurrencePattern object take effect when you call the underlying appointment's Send or Update method.