次の方法で共有


RecurrencePattern.Regenerate Property (Outlook)

Returns a Boolean that indicates True if the task should be regenerated following this pass through the recurrence pattern. Read/write.

Syntax

expression .Regenerate

expression A variable that represents a RecurrencePattern object.

Remarks

This property is used to control the regeneration of the task as each occurrence of a recurring task is completed. It is only valid for tasks. It is not valid for appointments.

To create a recurrence pattern, you must first set the RecurrenceType property to set the frequency, then set the Regenerate property to True to regenerate the task. After setting Regenerate to True, do not set it to False. If you subsequently set Regenerate to False, then you should set up the recurrence pattern again by getting a new RecurrencePattern object.

Example

This Visual Basic for Applications (VBA) example creates a task called "Oil Change" that recurs every three months and uses the Regenerate property to set it to regenerate after each recurrence.

Sub CreateTaskOilChange() 
 
 Dim myItem As Outlook.TaskItem 
 
 Dim myPattern As Outlook.RecurrencePattern 
 
 
 
 Set myItem = Application.CreateItem(olTaskItem) 
 
 Set myPattern = myItem.GetRecurrencePattern 
 
 myPattern.RecurrenceType = olRecursMonthly 
 
 myPattern.Regenerate = True 
 
 myPattern.Interval = 3 
 
 myItem.Subject = "Oil Change" 
 
 myItem.Save 
 
 myItem.Display 
 
End Sub

See Also

Concepts

RecurrencePattern Object Members

RecurrencePattern Object