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's only valid for tasks. It's 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, don't 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

RecurrencePattern Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.