15,917,808 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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.