Click here to Skip to main content
15,917,808 members

Comments by Avoird (Top 1 by date)

Avoird 22-Aug-19 13:15pm View    
Hi,
To be more specific then. The function below returns null in the object wordDocument:

object wordDocs = GetProperty("Documents", wordApplication);

wordDocument = InvokeMember("Open", wordDocs, new object[]{fileName, missing,
isReadonly, missing, missing, missing,
missing, missing, missing, missing,
missing, isVisible});

When I run the logic in my test Console application then the word document I am trying to open is opened and I can execute a macro inside.
When I run the application inside a service project in debugmode in visual studio I can also open the word document and run a marco.
Then when compiling to release mode and create a Setup project to install the application as a service then when starting the service from services manager it does not open the word doc instead, InvokeMember returns a null in the object.
I am developing this application in order to replace our Adobe Central Server and Adobe Designer software. Adobe stopped their support 7 years ago.

What have I done so far to try to resolve this...
Several solutions proposed on forums such as:
* creating a desktop folder in the Systems profile.
* Changing the DCOM impersonation from launching to interactive (which does not make sense of course when running as a service).

The service needs to run on W2016 with at latest MS Office word.

So I need some help to understand why my service is not able to launch the document I am trying to open and why the function returns a null value.

I hope this is detailed enough.