Just a note to those wanting to use COM to interface to printers under Windows 
2000/XP.  If it doesn't work or seems to hang, try changing the logon identity 
under which the Apache (assuming you're using Apache) service is running from 
the System account to another account.  By default most services will install 
to run under the System account and although the System account has total 
authority on the computer it is running on, it has no authority outside of that 
realm as I understand it.  Apparently accessing printers is considered "outside 
the realm".  I used this technique to interface a Dymo thermal label printer to 
my server and it works now. 

i selected another account on my pc like "Nick", he is admin
i tried it, but always this error

Could not start the Apache service on Local Computer.

Error 1069: The service did not start due to a logon failure

any help?

"Nick" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> i need to print the word file, but first testing by saving
> 
> this seems not to work, site keeps loading :s:s:s nothing happens
> 
> <?php
> $word = new COM("word.application") or die("Unable to instantiate Word");
> $file = "c:/reminder.doc";
> $word->Documents->Open($file);
> $new_file = "c:/reminder_new.doc";
> $word->Documents[1]->SaveAs($new_file);
> $word->Quit();
> $word->Release();
> $word = null;
> ?>
> 
> this neither, also much loading time, nothing happens
> 
> 
> // 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 = true;
> // Open a word document, or anything else that word can read
> $input ="c:\\beginverslag.doc";
> $word->Documents->Open($input);
> $new_file = "c:\\test.doc";
> $word->Documents[1]->SaveAs($new_file);
> // closing word
> $word->Documents[1]->Close(false);
> $word->Quit();
> // free the object
> $word->Release();
> $word = null;
> unset($word);
> 
> any suggestions?????

Reply via email to