Color in a document .doc

Dec 23, 2011 at 7:07pm
I use dev-c++ and I want to put color into a document. doc that I make in the same program c++, but I don't know how to do it. To put color I use an action of windows.h (textattribute) which change the color and print a few numbers with colors on the screen. Now I would like to show the same (with the same shape, style and colors) in this document. Doc.
thanks
Dec 23, 2011 at 7:13pm
closed account (10oTURfi)
Isnt .doc a binary file? How does one affect such file with c++?
Dec 23, 2011 at 7:53pm
the office has a function which decodes / encodes the text and turns it in code ascii to code normal. Therefore the treatment in c++ of a document .doc is identical to a .txt file
Dec 23, 2011 at 7:56pm
closed account (S6k9GNh0)
The file is still formatted in such a way that may or may not be introduced or have the ability to be manipulated by that function. Word uses proprietary formats after all...
Dec 24, 2011 at 12:01am
If by ".doc" file you are talking about a Microsoft Word file, then you are hopelessly out of luck. You'll want to manipulate such files using a COM/OLE interface -- which isn't particularly hard, but has a pretty steep learning curve.

If you are talking about something else, you'll need to be much more explicit about what you want to do.
Dec 24, 2011 at 10:32am
anytime I mean a .doc document as a Microsoft Word document because I need that it recognizes the characters of the ASCII code, therefore not having succeeded in a document. txt. If what I said above (put the same colors shown by the console screen) is easier to do it with a txt document and you know how to recognize the characters of the code ascii, tell me please.
Dec 24, 2011 at 5:54pm
closed account (S6k9GNh0)
...what?
Topic archived. No new replies allowed.