Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi Everyone,

I have a requirement from which i need to programmatically create a word document from ASP.net application. Mainly the word document will have set of questions, each question should be followed by an empty content control "Textbox".

The user is going to answer those questions, then have to upload the document again,then i have to loop through the document programmatically to get the answers out and save it to database.

how can this be implemented?? the creation of word document with an empty content controls and also looping through the document to get the text inside the content controls after the user answer the questions
Posted

1 solution

Please see my past answers:
Convert Office-Documents to PDF without interop[^],
Hi how can i display word file in windows application using c#.net[^],
Read a word file without using Interop.word dll...Do not want to install word in IIS..[^].

Not all if it is relevant, but you can find some basic ideas.

Also, please see this wonderful CodeProject article: A Professional HTML Renderer You Will Use[^].

Even though this work does not have anything to do with Word, if you look at the implementation, you may find that part of your work is already done. This wonderful component renders HTML as RTF. But RTF is something compatible with Microsoft Word, which can always use RTF data to create a Word document, if you use Word automation (I explained how to use Microsoft.Office.Interop in my answers referenced above). Just yet another idea you can try to consider.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900