Possible Duplicate:
How can a Word document be created in C#?
In one of my application i need to generate the word document from the C# code. like we are using the sql as database and we are storing the inventory data from the c sharp code to sql database.
There are third-party libraries to help, but if you want to develop a solution yourself, you may want to get hold of the Open XML SDK.
I recommend that rather than creating a Word document completely in code, you create a template document using Microsoft Word and then modify it using the Open XML SDK.
Don’t be tempted to use Word Automation if you’re producing the document on a server. Apart from being unsupported, it’s somewhat prone to resource issues.
I blogged some time ago about inserting images into Word documents using Open XML.