Recurrence

An appointment is made recurring by calling the AppointmentItem object’s GetRecurrencePattern method. This method returns a RecurrencePattern object, which is used to set recurrence information for the appointment. Calling GetRecurrencePattern also sets the AppointmentItem object’s IsRecurring property to True. Changes made to a RecurrencePattern object take effect when a call is made to the underlying AppointmentItem object’s Send or Update method.

An appointment can recur daily, weekly, monthly, or yearly. This is the recurrence unit. The default recurrence unit is weekly, but you can change this by setting the RecurrencePattern object’s RecurrenceType property to one of the following values:

CdoRecurTypeDaily

The appointment recurs daily.

CdoRecurTypeWeekly

The appointment recurs weekly (the default).

CdoRecurTypeMonthly

The appointment recurs monthly.

CdoRecurTypeMonthlyNth

The appointment recurs monthly, on the nth occurrence of a specific day of the week—for example, on the third Wednesday of each month.

CdoRecurTypeYearly

The appointment recurs yearly.

CdoRecurTypeYearlyNth

The appointment recurs yearly, on the nth occurrence of a specific day of the week in a specific month—for example, on the third Wednesday in April.

The RecurrenceType property is used in conjunction with other properties of the RecurrencePattern object to achieve a wide variety of recurrence patterns. The other properties used, and their meanings, vary depending on the value set in RecurrenceType. ...

Get CDO & MAPI Programming with Visual Basic: now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.