I used to be a classic asp user. I just started programming C# Windows form. In classic asp I was filling the gaps in a word document with the information we saved in the database. Is it possible in C# windows form as well? If possible, how can we do it?
I was filling in the blanks with the red cross in the picture in asp classic like that <%=rs("name")%> etc.


Rajkiran SwainRank #165 · 14.4K reputationPosted May 31, 2023, 7:29 AM EDT
Yes, it is possible to fill the gaps in a Word document using C# in a Windows Forms application. You can achieve this by using the Microsoft Office Interop libraries, specifically the Word Interop library.
Leon DRank #851 · 2.6K reputationPosted May 31, 2023, 9:23 PM EDT
You can use Spire.Doc library (https://www.e-iceblue.com/Introduce/word-for-net-introduce.html) to easily fill the gaps in a Word document with C#.
You will find a series of guides for this library by visiting the following link:
https://www.e-iceblue.com/Tutorials/Spire.Doc/Spire.Doc-Program-Guide/Spire.Doc-Program-Guide-Content.html
Mehmet FatihRank #1,474 · 1.1K reputationPosted Jun 1, 2023, 7:10 AM EDT
Thanks both of you.
Mehmet FatihRank #1,474 · 1.1K reputationPosted Jun 12, 2023, 12:53 PM EDT
I want to fill in the word documents from th datas in the database. I am adding the Microsoft Office Interop reference. But I don't have an idea about how to add data into word document. Will you give an example please?