Mail merge with large data set

I have an ASP.NET web app using Aspose.Words that I’ve written to mail merge a form letter. It works with 1,000 records but opens the document already merged so it’s a 1,000 page document. When I try using 5,000 records I hit an out of memory error.
Is it possible to set up the merge and open Word in the pre-complete-the-merge step of Word where you can step through the records and then send the doc to the printer?
I can open the document and go through the steps in Word for 5,000 records (ultimately I need to merge 17,000) but the goal is to provide a web app to our users so they don’t need to have the correct data source setup. I’d like that to be set dynamically in the app.

Hi
Thanks for your request. I think, in your case, you can split your data source into pars and generate a separate document for each part. It is not recommended to generate such large MS Word documents. Even MS Word does not like such documents.
You can use the similar approach as suggested here:
https://docs.aspose.com/words/net/mail-merge-and-reporting/
But in your case, you should not generate a separate document for each record, but generate a separate document for each 1000 records, for example.
Best regards,