Can anyone help me in extracting all the tables and its contents that are present in a MS word document using c++ or C

Take a look at Office Automation Using Visual C++

hey but i am working in linux shell and i want to write c++ program in there only.
Could u plz help in that.
I mean i wanted to know the representation of a doc file(byte format). Rest i can handle if i get the representation.

thanks in advance