Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Code project,

I need some help in C#. Actually my requirement is like based on the value in count textbox i will be generating textboxes in windows forms. I will store all these textbox values in a List and on hitting the submit button these List values need to be updated in an MS word table that i have already created in an word document.

Now the question is how to pass the List values to the word document in a particular cell in the table.

Based on the value in count textbox the table in MS word also need to grow dynamically.


Please help me in solving this...
Posted
Updated 10-May-14 7:22am
v2

You need to use MS Office Interop. Microsoft.Office.Interop.Word.dll
Go through the below links, you'll get a clear picture.
MSDN 1
MSDN 2
MSDN 3
Best of Luck!
 
Share this answer
 
Comments
Maciej Los 10-May-14 16:39pm    
Nice collection of links ;)
I disagree that Office COM is the way to go. Microsoft doesn't recommend using it and you should avoid it if possible. I can tell you first hand that using it in a serious project (even windows app) will not be rewarding in the long run. Use Office COM only if your application will be used from time to time by a small number of users. If you need to create an automated document solution solution that will be in the heart of a business application then you will need to use something that is not based on Office COM. At this point you have two options: The first one is a free one using Microsft's Open XML SDK and the second one is using a commercial library that mostly demands the least amount of work.
 
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