Dynamic View to export the data into excel sheet

How to create the dynamic view in lotus notes using lotus script. BY using search method I am able to fetch only 5000 docuemnts to export into excel sheet. So, I would like to create the dynamic view based on the inputs(slection criteria) and then would liek to export the documents from dynamic view into excel sheet. COuld you please help on this to achieve.