Dim dateRange As NotesDateRange
Dim dateTime1 As New NotesDateTime(Cstr(doc.PDRfrom(0)))
Dim dateTime2 As New NotesDateTime(Cstr(doc.PDRto(0)))
Set dateRange = session.CreateDateRange()
Set dateRange.StartDateTime = dateTime1
Set dateRange.EndDateTime = dateTime2
Dim view As NotesView
Set view = db.GetView("DataLU4XMLGen")
Set collect = view.GetAllDocumentsByKey(dateRange, True)