How to create word document using C# or C++

Hello everyone..
i want to ask from you people that how can i generate a word document using C++ or C#. Actually I am the beginner and i don't know how to create it, my problem is that i want to open word document, then i want to write text with proper formatting like space between two words according to my desire, capitalization of the initial & etc using C++ or C#. if any one know about it then please help by commenting or sending a message or giving me a helpful link. Thanks in advance..
waiting for your precious comments...
What you are trying to do is not a beginner-level project. Microsoft documents have an internal format that is quite complex and subtle. I have personal experience generating an Excel spreadsheet from a C++ program, and it was time consuming and frustrating, and I spent hours going over hex dumps of the generated file to see where the tags, lengths or values of my fields were messed up.

If you really want to try to tackle this, you need to find the word document specifications on line, spend a few days digesting the specs, and then slowly build up your generated word document. I believe the official document format specifications can be found on the microsoft web page somewhere, but I found this document with a simple google search.

http://www.digitalpreservation.gov/formats/digformatspecs/Word97-2007BinaryFileFormat%28doc%29Specification.pdf
Forget the documentation. It's inaccurate.

Control an instance of Word using a COM/ActiveX/OpenXML interface.

I recommend you check out libOPC
http://libopc.codeplex.com/

Like doug4 said, this is a lot of work for a beginner.

Good luck!

Thank You very much doug4 and Duoas... :)
Topic archived. No new replies allowed.