Re: Generating word documents based on fields in a browser
| From: | Michael Davey | Date: | Thu, 11 Jul 2002 13:29:54 +0000 |
| Subject: | Re: Generating word documents based on fields in a browser | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107118@lists.php.net to get a copy of this message | ||
> <?
> $word=new COM("word.application") or die("Cannot start MS Word");
> print "Loaded word version ($word->Version)\n";
> $word->visible = 1 ;
> $word->Documents->Add();
> $word->Selection->Typetext("This is a test");
> ?>
>
> does anyone recognise this?????
Oh yes - this would be Word via COM - if you are having problems getting
this to work, I would suggest consulting the VBA reference manual that comes
with Office - it will give you the methods/objects available to you, as well
as examples of how to use them...
Mikey