LOTUSSCRIPT/COM/OLE CLASSES
Sub Initialize Set session = New NotesSession Dim db As NotesDatabase Set db = session.CurrentDatabase Dim dc1 As NotesDocumentCollection Dim dc2 As NotesDocumentCollection searchFormula$ = {Form = "Followup" & Status = "Active" & @Date(FollowupDate) <= @Tomorrow} Set dc1 = db.Search(searchFormula$, Nothing, 0) ' all these docs need to have followup deadlines extended, ' but not all by the same amount. Set dc2 = dc1.Clone() ' limit dc2 to only low-priority docs -- longer deadline. Call dc2.FTSearch( { [priority] = "Low" }, 0) ' and remove those low-priority ones from dc1 Call dc1.Subtract(dc2) Dim nextmonth As New NotesDateTime( "" ) Call nextmonth.SetNow Call nextmonth.AdjustMonth( 1 ) Call dc1.StampAll("FollowupDate", nextmonth) Dim twoMonths As New NotesDateTime("") Call twoMonths.SetNow Call twoMonths.AdjustMonth( 2 ) Call dc2.StampAll("FollowupDate", twoMonths) End Sub