編輯

共用方式為


RecurrencePattern Interface

Definition

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

public interface class RecurrencePattern
[System.Runtime.InteropServices.Guid("00063044-0000-0000-C000-000000000046")]
public interface RecurrencePattern
Public Interface RecurrencePattern
Attributes

Remarks

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

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 object.

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. 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 .

olRecursDaily Duration, EndTime, Interval, NoEndDate, Occurrences, PatternStartDate, PatternEndDate, StartTime
olRecursWeekly DayOfWeekMask, Duration, EndTime, Interval, NoEndDate, Occurrences, PatternStartDate, PatternEndDate, StartTime
olRecursMonthly DayOfMonth, Duration, EndTime, Interval, NoEndDate, Occurrences, PatternStartDate, PatternEndDate, StartTime
olRecursMonthNth DayOfWeekMask, Duration, EndTime, Interval, Instance, NoEndDate, Occurrences, PatternStartDate, PatternEndDate, StartTime
olRecursYearly DayOfMonth, Duration, EndTime, Interval, MonthOfYear, NoEndDate, Occurrences, PatternStartDate, PatternEndDate, StartTime
olRecursYearNth DayOfWeekMask, Duration, EndTime, Interval, Instance, NoEndDate, Occurrences, PatternStartDate, PatternEndDate, StartTime

When you work with recurring appointment items, you should release any prior references, obtain new references to the recurring appointment item before you access or modify the item, and release these references as soon as you are finished and have saved the changes. This practice applies to the recurring AppointmentItem object, and any Exception or RecurrencePattern object. To release a reference in Visual Basic, set that existing object to Nothing. In C#, explicitly release the memory for that object.

Note that even after you release your reference and attempt to obtain a new reference, if there is still an active reference, held by another add-in or Outlook, to one of the above objects, your new reference will still point to an out-of-date copy of the object. Therefore, it is important that you release your references as soon as you are finished with the recurring appointment.

Properties

Application

Returns an Application object that represents the parent Outlook application for the object. Read-only.

Class

Returns an OlObjectClass constant indicating the object's class. Read-only.

DayOfMonth

Returns or sets an Integer (int in C#) value indicating the day of the month on which the recurring appointment or task occurs. Read/write.

DayOfWeekMask

Returns or sets an OlDaysOfWeek constant representing the mask for the days of the week on which the recurring appointment or task occurs. Read/write.

Duration

Returns or sets an Integer (int in C#) value indicating the duration (in minutes) of the RecurrencePattern. Read/write.

EndTime

Returns or sets a DateTime indicating the end time for a recurrence pattern. Read/write.

Exceptions

Returns the Exceptions collection for a specified series of recurring appointments. Read-only.

Instance

Returns or sets an Integer (int in C#) value specifying the count for which the recurrence pattern is valid for a given interval. Read/write.

Interval

Returns or sets an Integer (int in C#) value specifying the number of units of a given recurrence type between occurrences. Read/write.

MonthOfYear

Returns or sets an Integer (int in C#) value indicating which month of the year is valid for the specified recurrence pattern. Read/write.

NoEndDate

Returns a Boolean (bool in C#) value that indicates True if the recurrence pattern has no end date. Read/write.

Occurrences

Returns or sets an Integer (int in C#) value indicating the number of occurrences of the recurrence pattern. Read/write.

Parent

Returns the parent Object of the specified object. Read-only.

PatternEndDate

Returns or sets a DateTime indicating the end date for the recurrence pattern. Read/write.

PatternStartDate

Returns or sets a DateTime indicating the start date for the recurrence pattern. Read/write.

RecurrenceType

Returns or sets an OlRecurrenceType constant specifying the frequency of occurrences for the recurrence pattern. Read/write.

Regenerate

Returns a Boolean (bool in C#) that indicates True if the task should be regenerated following this pass through the recurrence pattern. Read/write.

Session

Returns the NameSpace object for the current session. Read-only.

StartTime

Returns or sets a DateTime indicating the start time for a recurrence pattern. Read/write.

Methods

GetOccurrence(DateTime)

Returns a specific instance of the AppointmentItem object on the specified date.

Applies to