i'm new to this forum, so let me introduce myself quickly : my name is Guillaume, I live in France and work ad developer in a small company in Montpellier. (please excuse my bad english...)
Here is my problem :
I'm currently using C# to convert Microsoft Office document (Word, Excel, Powerpoint and Publisher) using the SaveAs module of Microsoft Office.
Here is a sample of code, working well to convert Word to PDF :
|
This is not the full code, but the main processing code is here. This works perfectly when the program is running as a normal software, under an opened user Windows Session (Tested with Office 2010, 2007, under Windows 7 and Windows Server 2008).
When I run this code as a Windows Service (SYSTEM LOCAL), then it doesn't work. So I searched some information on the internet, and I found this page from the Microsoft Website :
http://support.microsoft.com/?scid=kb%3Ben-us%3B257757&x=20&y=13
This page explain why it doesn't work when the code is running as service. So, finally I decided to use the application as a normal software, not as a Windows Service.
But few days ago I found a SDK nammed VeryPDF, that is using the same SaveAs module of Microsoft Office, and that is able to run as service.
So I searched more information to know how it works... but I didn't find anything.
Can some one help me and give me some advice to do this as service ? (VeryPDF is not open source, and cost around 18000$... so I cannot pay it :)).
Thank you very much for your help.
Guillaume LepinayPosted Jan 27, 2011, 1:37 PM
Suthish NairPosted Jan 27, 2011, 11:58 AM
Let us know above post reply helped you, this something new to me also using services :)
RoschiPosted Jan 27, 2011, 8:31 AM
it is never too late to give an answer..... ;-)
I do the same Job as you a few month ago...
I don't know on Which site I found the solution but in my documentation I found the following entry:
you must change the identity of word component in
....\windows\System32\comexp.msc
to be interactive user instead of launching user
After I changed this settings I was able to run my App as a service
Regards