Dim s As New notessession Dim db As notesdatabase Set db = s.currentdatabase defdate = s.getenvironmentstring("eDefDate") deffolder = s.getenvironmentstring("eDefFolder") If defdate="" Then defdate = Cstr(Today) If deffolder="" Then deffolder = "RejectedAgesAgo" d= Inputbox$("What date should they be created before?", "Date", defdate) f=Inputbox$("What folder should they be put in?","Folder", deffolder) Call s.setenvironmentvar("EDefDate", d) Call s.setenvironmentvar("EDefFolder", f) Dim col As notesdocumentcollection Set col = db.ftsearch("",20) Set SearchDate = New NotesDateTime("01/10/1999") Selection = "Form = ""F1"" & Date1 <= @Adjust(" & d & ";0;0;0;0;0;0)" Selection = "Form = ""F1"" & Date1 <= [" & d & "]" Print Selection Set Col = DB.Search(Selection, SearchDate, 0) If Col.Count = 0 Then Print "none found" Else Call col.putallinfolder(f) Print "moved " & col.count End If
Note a new folder is not shown on the folders view until the database is closed
and reopened. If you know a way aroud this let me know!