PDA

View Full Version : opening .doc files in unix through C program



indira78
10-19-2001, 04:23 AM
:( From the C or C++ program i need to read the contents of the file with extension .doc. It is actually the Word document. It contains only the ASCII characters. Is there any way to convert the Word document file with ASCII or junk characters as the normal Word document and read the contents of the file...

Plz help me in this regard...

Engineer
10-19-2001, 10:05 AM
You can do it if you get source code for Word and Word Reader or something similar. Something like this should be avaliable on the net. Then, after you figure out the exact format Word saves its documents, you will be able to convert them to anything you like.

Cheers.

Flarelocke
10-19-2001, 03:36 PM
http://www.wvware.com/

Engineer
10-20-2001, 01:12 AM
There is also a program under Unix/Linux that is called word2x or doc2x, that allows you to open .doc files in read-only mode. The source code for it should be available.

Cheers.

sigma
11-05-2001, 12:57 PM
This is what I did about two years ago.

I wrote a program to open a word document in binary and output the contents in hex with ascii printable characters.

I then made changes to the document in Word and figured out how it changed to file.

After about two hours, I was able to edit the document in a C program and view the changes in Word.

By using the same approach, you should be able to determine where the actual text in a word document is stored in the file.