PatternEndDate Property (RecurrencePattern Object)

PatternEndDate Property (RecurrencePattern Object)

The PatternEndDate property returns or sets the day on or before which the appointment last recurs. Read/write.

Syntax

objRecurPatt.PatternEndDate

Data Type

Variant (vbDate format)

Remarks

The PatternEndDate property contains the latest possible date of the last occurrence of the appointment. This qualification is necessary because PatternEndDate is not required to be included in the pattern specified by the DayOfMonth, DayOfWeekMask, Instance, Interval, and MonthOfYear properties. A recurrence is generated on PatternEndDate only if it matches the pattern.

PatternEndDate is always valid on a newly created RecurrencePattern object and defaults to the month and day of the PatternStartDate property in the year 4001.

The time component of the vbDate format is ignored when you set the PatternEndDate property. When you read PatternEndDate, the time component of the StartTime property is used to return a full vbDate value representing the starting time on the ending date.

The date component of PatternEndDate must not be earlier than PatternStartDate. These two properties determine the overall time period during which the AppointmentItem object is scheduled for recurrence.

Setting the PatternEndDate property causes CDO to force certain other recurrence pattern properties into conformance. Occurrences is recalculated from PatternStartDate and PatternEndDate, and NoEndDate is reset to False. However, if PatternEndDate is January 1, 4000 or later, NoEndDate is reset to True, Occurrences is reset to 1,490,000, and PatternEndDate is reset to the month and day of PatternStartDate in the year 4001.

You cannot change PatternEndDate to a date earlier than the current PatternStartDate.

If you change the PatternEndDate after one or more individual recurrences have been instantiated, Microsoft® Schedule+ automatically deletes any recurrences later than the new PatternEndDate, and Microsoft® Outlook® deletes all instantiated recurrences. CDO determines what your active calendar store is and deletes recurrences in the appropriate manner.

CDO imposes a limit of December 31, 3999 on PatternEndDate and 1,489,999 on Occurrences. If either of these properties exceeds its limit, NoEndDate is automatically reset to True, Occurrences is reset to 1,490,000, PatternEndDate is reset to the month and day of PatternStartDate in the year 4001, and the recurrence pattern is considered to extend infinitely far into the future.

Changes you make to properties on a RecurrencePattern object take effect when you call the underlying appointment's Send or Update method.

See Also

Concepts

RecurrencePattern Object