combo of MS WORD & PHP
Posted: Mon May 13, 2002 10:57 am
Hi all,
I'd like to run a simple PHP script which opens a word file and extracts some specific parts of that file, followed by a screen output of the text. I'm already able to open that file, but as I try to run:
$word = new COM("word.application") or die("Unable to instantiate Word");
$scr = $word->paragraphes(1);
$scr2 = com_get($scr,ranges);
echo $scr2;
I see everything but my text.
Please help, or tell me how to "translate" VBScripts into PHP/COM
(eg $word->paragraphes(1)->ranges; doesn't work, but in VBS
activedocument.paragraphes(1).ranges runs without trouble)
I'd like to run a simple PHP script which opens a word file and extracts some specific parts of that file, followed by a screen output of the text. I'm already able to open that file, but as I try to run:
$word = new COM("word.application") or die("Unable to instantiate Word");
$scr = $word->paragraphes(1);
$scr2 = com_get($scr,ranges);
echo $scr2;
I see everything but my text.
Please help, or tell me how to "translate" VBScripts into PHP/COM
(eg $word->paragraphes(1)->ranges; doesn't work, but in VBS
activedocument.paragraphes(1).ranges runs without trouble)