hi guy's I have a problem running com+ code and would appreciate any help.

What I like to do is have the mediaplayer run a wave file triggert from php
via com.
but I can not run any example code from the help without errors.


this code is from a the help and should work but doesn't on my mashine:

// starting word
$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word->Version}\n";

//bring it to front
$word->Visible = 1;
//open an empty document
$word->Documents->Add();
//do some weird stuff
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");
//closing word
$word->Quit();
//free the object
$word->Release();
$word = null;

This is all very basic code and should run.
I do not have word so I tried with other apps. like wordpad or painbrush
but allways recieve this error:

Warning: Invalid ProgID, GUID string, or Moniker: Invalid syntax in
D:\Apache\htdocs\ring.php on line 7
Unable to instanciate ..........

Now I tried to give the access right's on the particular apps in dcomcnfg
and
also edited php.ini to
allow Distributed-COM calls
com.allow_dcom = true


Does anybody can give me a run down on what I have to do exactly to get this
code running for
let's say wordpad.

Thank you

KAi





-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to