Schedule+ allows you to define recurring appointments. The exact appointment dates are determined by a recurrence pattern that specifies on which days, weeks, months, or years the appointment recurs. Recurring appointments can be created only in the RecurringAppointments table.
The following sample code creates a new appointment that recurs weekly on Tuesday and sets a reminder two days before the appointment:
Public Sub CreateRecurAppt()
Dim objTable As Object
Dim objItem As Object
Dim dt As Date
'Get the RecurringAppointments table from the global Schedule object.
Set objTable = objSchedule.RecurringAppointments
'Create a new item in the RecurringAppointments table.
Set objItem = objTable.New
'Set the desired properties on the item.
dt = Now
objItem.SetProperties Text:="Weekly Recurring Appointment" & Now(), _
BusyType:=btfNormal1Busy, Ring:=True, AlarmAmount:=CLng(2), _
AlarmTypeUnit:=CLng(2), BeforeEnd:=False, _
RecurringType:=trecurWeekly, WeekInterval:=CLng(1), _
DayOfWeekMask:=CLng(4), DayOfWeekStart:=CLng(0), _
StartRecurringDate:=LConvertTo32bitDate(dt), _
EndRecurringDate:=LConvertTo32bitDate(DateAdd("yyyy", 1, dt)), _
StartRecurringTime:=LConvertTo32bitTime(DateAdd("h", 1, dt)), _
EndRecurringTime:=LConvertTo32bitTime(DateAdd("h", 2, dt))
'Release the objects.
Set objItem = Nothing
Set objTable = Nothing
End Sub