Re: Re: COM and Word, how?
| From: | Scott Carr | Date: | Tue, 03 Sep 2002 01:26:40 +0000 |
| Subject: | Re: Re: COM and Word, how? | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-15645@lists.php.net to get a copy of this message | ||
Can you open Word in ActiveState Perl or some other app? (Besides VBA.)
It may be a problem with your word COM settings.
--
Scott Carr
OpenOffice.org
Documentation Maintainer
http://documentation.openoffice.org/
Quoting Dallas Thunder <dallas@php.net>:
> Well, this script works fine on my machine. Windows XP w/ Office XP, PHP
> 4.2.3.
>
> "Michelle" <michelledebeer@yahoo.com> wrote in message
> news:20020902171132.91711.qmail@pb1.pair.com...
> > I am new to COM and tried an example today (See bottom of post)
> >
> > When I execute the code, I get is an error message and if I look in the
> Task
> > Manager, there is a WINWORD.EXE process running, which I can't end. Every
> > time I reload the page, a new winword is started...
> >
> > How should PHP.ini be set for me to use COM Objects?
> >
> > ---------------------------------
> > Error message:
> > Warning: Unable to obtain IDispatch interface for CLSID
> > {000209FF-0000-0000-C000-000000000046}: The message filter indicated that
> > the application is busy. in d:\inetpub\wwwroot\incmill\ver2\readfile.php
> on
> > line 2
> > Unable to instantiate word
> >
> > Setup:
> > Windows 2000 Professional
> > PHP 4.2.1
> > Office 2000
> >
> > PHP.ini
> > COM values:
> > Directive, Local Value, Master Value
> > com.allow_dcom, Off, Off
> > com.autoregister_casesensitive, On, On
> > com.autoregister_typelib, Off, Off
> > com.autoregister_verbose, Off, Off
> > com.typelib_file, no value, no value
> >
> >
> > Code:
> > $word = new COM("word.application") or die("Unable to instantiate
Word");
> > print "Loaded Word, version {$word->Version}<BR>";
> > $word->Visible = 1;
> > $word->Documents->Add();
> > $word->Selection->TypeText("This is a test...");
> > $word->Documents[1]->SaveAs("Useless test.doc");
> > $word->Quit();
> >
> >
> >
> >
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/