Windows 2008 service Office automation cant find printer.
Hi,
I have programmed a Windows Service that open a document in Microsoft Word, and then print it to a Ghostscript PDF printer to create a PDF file.
It work perfectly on Windows 2003 server. But running it on Windows 2008 r2 it fails. (I am aware of the Desktop folders that need to be created under the system profile, and that solved another problem I had at first).
If i run the service as an application instead, everything works perfect. So it seems that everything is setup and configured correctly.
But when I run it as a Service, I get the following error in my logfile, generated from Microsoft Word:
"Error in Microsoft Word: Word cannot print. There is no printer installed."
I have added a printer and manually selected the Ghostscript driver, and also set it as a default printer. So it should work.
When I added the printer I was logged in as an administrator. And it is the same user that runs the Service (it is not the system user).
Please help me with this! It is very urgent. I have spent a couple of days now googling on it but cant find anything useful.
Re: Windows 2008 service Office automation cant find printer.
Originally Posted by sotoasty
Possibly, "Allow service to interact with desktop"?
Thanks, but as I said the service is configured to run with a specific user, not the internal one (so this checkbox is unavaliable).
But I recently discovered in some other forums that even if the Service is run by a specific user, it apparently get the environment
from the interal user. Maybe thats why it cant locate the printer.
Do anyone know how to fix this? To make the system user able to find the printers?
Re: Windows 2008 service Office automation cant find printer.
I have to make a correction.
I tried this in two similar windows 2008 server environments (vmware), and I realize that in one of them I forgot to configure the service to run with the .\administrator. Instead it runs with the "local service" account, which might explain why I cant find any printer installed.
But, when I change it to administrator, i still get problem. Error 372 in the event viewer, a classic spooling problem. In advanced setup on the printer i changed the setting to print directly to the printer (without spooling), but it did not work (the error in event viewer dissapeared though).
Bookmarks