-   Programming (
-   -   problem in reading Microsoft word as a binary file (

ljqu_happy 09-01-2004 11:44 AM

problem in reading Microsoft word as a binary file
I need to open a Microsoft word document as a binary file, and read it, but i cann't find the relation of the code of this binary file with this word document, for example, i didn't know where is the end of word document.
I'm very puzzled that i can't find it from Microsoft's web. Who can help me with some documents on the Microsoft word coding format or with the method to find them? Thanks!

ljqu_happy 09-01-2004 11:47 AM

Maybe a suggestion on other good forums can also do me a favor!

jhorvath 09-01-2004 01:43 PM

perhaps the sourcecode could help? or maybe they have some docs?

itsme86 09-01-2004 04:50 PM

Try this page and look at the files for DOC:

mhearn 09-02-2004 06:35 AM

I'm afraid you cannot read binary word DOC files precisely, this is a task which still eludes highly professional developers working on it for years. The format is *extremely* complex - if you have to ask, you probably can't read it.

There is a libwv but this is GPLd. It's also fairly basic. It may help though.

ljqu_happy 09-02-2004 09:48 AM

to itsme86:
thank you for your help, I download "Microsoft Word 6.0 Binary File Format", and have read it for a few hours, but I think it's a bit difficult for me, because i'm a begginer. I will continue on reading it, and maybe I still need your help.

ljqu_happy 09-02-2004 09:57 AM

to mhearn:
I think I understand your meanings. Yes, I know the format of word DOC file is *extremely* complex, so I don't want to know the every bit of the file.What I want to know is only where is the begin of the document, and where is the end, and if i insert a picture in the document, what changes will happen on the document.

ljqu_happy 09-02-2004 10:12 AM

Now I use Microsoft office word 2003. I open the DOC file with Ultraedit, and after many tests, I found the begin of the document is 0x00000a00, and guess(only guess, I don't know the end) the document is stored in binary file in turn, but if I insert a picture or a control button or a macro, I didn't know what will happen, where is the message of these things, what changes happen on the document file. What I want is to know these things, to find the begin and the end of the document, and find the message of the picture, the other messages are not important to me.

ljqu_happy 09-03-2004 07:36 AM

After reading "Microsoft Word 6.0 Binary File Format", I think now I have known much more about the binary file format of Microsoft word than before, I have found my questions' answers now. What I need to do is to find as many as docs about all versions of Microsoft word. However, thanks you for all your helps!

ljqu_happy 09-03-2004 09:46 AM

Hello, everyone! I'm back for helps. I can't find the binary file format of Microsoft word 2002,2003. I have searched in google, and also gone to, but can't found anything useful. Is there somebody know that whether Microsoft Corporation have release this? Who can show me these files? Thanks!

ljqu_happy 09-04-2004 03:49 AM

I'm crying:( Why nobody answer me? Is there somebody tell me whether Microsoft Corporation have released these documents?

chrism01 09-04-2004 06:27 AM

You might find the src to this: useful.
See also Perl module WIN32::OLE , , .

mhearn 09-06-2004 04:40 AM

The last publically available specs for the office file formats were for Office 97.

I'm afraid the address you found for the start of the document will change from file to file. Your best bet is libwv.

ljqu_happy 09-07-2004 05:34 AM

Thank mhearn's help, but what's libwv, where can I get it?
As you say, I haven't found any document for Office versions after 97.

mhearn 09-07-2004 08:00 AM

All times are GMT -5. The time now is 02:18 PM.