Page 1 of 1

Technique for extracting text from msword files into php var

Posted: Wed Oct 23, 2002 7:04 am
by dickey
I am attempting to preview centrally stored ms word files.

I would like to read a ms word file and store text only (ex meta data and formatting codes) into a var, and then display some or all of the text.

I am familar with doing this for text files eg.

Code: Select all

$myfile = "C:\\mydocument.txt";
$myopenfile = fopen($myfile, "rb");
$contents = fread($myopenfile, filesize($myfile));
fclose ($myopenfile);
echo $contents;
The question arises is their a technique that maybe used with msword or other rich text files that loses the meta data and formatting tags, leaving the documents text only.

Any help greatly appreciated, Thank you.

- Andrew

Posted: Wed Oct 23, 2002 2:00 pm
by DeGauss
Good luck buddy.

Seriously.

Posted: Thu Oct 24, 2002 5:20 am
by Takuma
I think there was a script that process the MS word document. Try searching this forum...