Click or drag to resize

IRecurrenceComputeDates Method

Calculates all dates in the recurring event. Must be called before Save is done on the owning appointment. Returns a collection of all the dates. The optional parameter tells how many recurrences the rule should generate and overrides the enddate.

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
SODates ComputeDates(
	short numRecurrences = 0
)

Parameters

numRecurrences (Optional)
Type: SystemInt16
Integer - If you want to set number of recurrences

Return Value

Type: SODates
SODates - The dates for the new appointments
Examples

ComputeDates

VB
Dim db, Dates, Appnt
Set db = CreateObject("SuperOfficeDB.Database")
enPatternDaily = 1
enSubPatternDaily_EveryDay = 2
enThisAndForward = 2

If db.Login("USERNAME", "PASSWORD") Then

    Set Appnt = db.GetAppointment(4)

    Appnt.Recurrence.Pattern = enPatternDaily
    Appnt.Recurrence.SubPattern = enSubPatternDaily_EveryDay
    Appnt.Recurrence.StartDate = appnt.DoBy
    Appnt.Recurrence.EndDate = DateAdd("d", 5, appnt.DoBy)
    Appnt.UpdateMode = enThisAndForward
    Set Dates = Appnt.Recurrence.ComputeDates
    If Not Dates.Empty Then
     For i = 0 To Dates.Count - 1
      msg = msg & Dates.Item(i) & ", "
      msg = msg & Dates.Exists(i) & vbCrLf
     Next
    MsgBox msg, vbInformation, "Appointments created on"
    End If

    Appnt.Save
Else
    MsgBox ("failed to log in")
End If

See Also