Hi, I also encountered some issues when I used a .NET word interop
in ASP.NET app.
I found that it is not supported: MS support page
(Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications on server side), but they provide some alternatives to server-side automation.
You could try this alternative VB.NET Word
component to achieve mail merge in .NET
from the server side, here is a small example:
' Load DOC document.
Dim document = DocumentModel.Load("ThankYou.doc")
' Execute mail merge.
Also you could easily print Word with .NET
without PrintDialog popping out, just use this:
Additionally, aditya_raj you can also check this out because I found its mail merge process to be very flexible and customizable.
You could for example read CSV file into a DataTable and then use it as an data source for a mail merge execution, after which you could convert Word file to a PDF in .NET
like the following: