GetRecurrencePattern Method

Microsoft Outlook Visual Basic

GetRecurrencePattern Method

       

Returns a RecurrencePattern object that represents the recurrence attributes of an appointment or task. If there is no existing recurrence pattern, a new, empty RecurrencePattern object is returned.

expression.GetRecurrencePattern

expression   Required. An expression that returns an AppointmentItem or TaskItem object.

Example

This Visual Basic for Applications example uses GetRecurrencePattern to obtain the RecurrencePattern for an appointment.

Set myOlApp = CreateObject("Outlook.Application")
Set myAppt = myOlApp.CreateItem(olAppointmentItem)
Set myPattern = myAppt.GetRecurrencePattern

If you use VBScript, you do not create the Application object, and you cannot use named constants. This example shows how to perform the same task using VBScript.

Set myAppt = Application.CreateItem(1)
Set myPattern = myAppt.GetRecurrencePattern