RecurrencePattern Object

RecurrencePattern Object

See Also         Example         Properties         Methods

Multiple objects
RecurrencePattern object
Exceptions collection (Exception object)

Represents the pattern of incidence of recurring appointments and tasks for the associated AppointmentItem and TaskItem object.

Using the RecurrencePattern Object

Use the GetRecurrencePattern method to return the RecurrencePattern object associated with an AppointmentItem or TaskItem object.

Remarks

Calling GetRecurrencePattern or ClearRecurrencePattern has the side effect of setting the IsRecurring property of the item accordingly. This property can be used as required for efficient filtering of the Items collection.

The type of recurrence pattern is indicated by the RecurrenceType property. The RecurrenceType property is the first property you should set.

The following properties are valid for all recurrence patterns: EndTime, Occurrences, StartDate, StartTime, or Type.

The following table shows the properties that are valid for the different recurrence types. The properties listed are not all required for the given type; an error occurs if the item is saved and the property is null or contains an invalid value. Monthly and yearly patterns are only valid for a single day. Weekly patterns are only valid as the Or of the DayOfWeekMask.

Value RecurrenceType Properties Example
0 olRecursDaily Interval Every N days
    DayOfWeekMask Every Tuesday, Wednesday, and Thursday
2 olRecursMonthly Interval Every N months
    DayOfMonth The Nth day of the month
3 olRecursMonthNth Interval Every N months
    Instance The Nth Tuesday
    DayOfWeekMask Every Tuesday and Wednesday
1 olRecursWeekly Interval Every N weeks
    DayOfWeekMask Every Tuesday, Wednesday, and Thursday
5 olRecursYearly DayOfMonth The Nth day of the month
    MonthOfYear February
6 olRecursYearNth Instance The Nth Tuesday
    DayOfWeekMask Tuesday, Wednesday, Thursday
    MonthOfYear February