DayOfWeekMask Property (RecurrencePattern Object)

DayOfWeekMask Property (RecurrencePattern Object)

The DayOfWeekMask property returns or sets the mask for the days of the week on which the appointment recurs. Read/write.

Syntax

objRecurPatt.DayOfWeekMask

Data Type

Long

Remarks

The DayOfWeekMask property contains the days of the week on each of which the AppointmentItem is to recur. It can include the following values in any combination:

DayOfWeekMask setting

Decimal value

Meaning

CdoSunday

1

The appointment recurs on Sundays.

CdoMonday

2

The appointment recurs on Mondays.

CdoTuesday

4

The appointment recurs on Tuesdays.

CdoWednesday

8

The appointment recurs on Wednesdays.

CdoThursday

16

The appointment recurs on Thursdays.

CdoFriday

32

The appointment recurs on Fridays.

CdoSaturday

64

The appointment recurs on Saturdays.

The maximum value for the DayOfWeekMask property is 127, which is the logical inclusive OR of all seven days. An attempt to set DayOfWeekMask to any value less than 1 or greater than 127 results in a return of CdoE_INVALID_PARAMETER.

Note that the DayOfWeekMask property is not compatible with the CDO Rendering ContainerRenderer object's FirstDayOfWeek property or the Session object's "FirstDayOfWeek" option, which use an enumeration starting with 1 for Monday and ending with 7 for Sunday. The session options are obtained with the GetOption method and set with the SetOption method. The Session object's "WorkingDays" option, however, is compatible with the mask constants used by DayOfWeekMask.

DayOfWeekMask is only valid if the value of the RecurrenceType property is CdoRecurTypeWeeky, CdoRecurTypeMonthlyNth, or CdoRecurTypeYearlyNth. When DayOfWeekMask is valid on a newly created RecurrencePattern object, it defaults to the current day of the week.

Setting DayOfWeekMask to multiple days per week is only valid if the value of the RecurrenceType property is CdoRecurTypeWeekly. Recurrences of type CdoRecurTypeMonthlyNth or CdoRecurTypeYearlyNth can only use a single day per week.

Note   If the AppointmentItem object has been made into a meeting, the DayOfMonth, DayOfWeekMask, and MonthOfYear properties are all held internally in the meeting organizer's current time zone. If these properties are displayed or read by a messaging user in a different time zone, they are not converted. The user or application accessing these properties may need to be aware that they represent the organizer's time zone.

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