Closed abinscjames closed 4 years ago
Did you configure Windows Service for running Office Automation?
https://support.microsoft.com/en-us/help/257757/considerations-for-server-side-automation-of-office
Please, reopen the issue when you will provide more information.
We are trying to create an application(Win Service) to automate WinWord.exe process for some tasks. When we deployed as a console application all works fine. But when we host the same as an WinService, we are encountering this issue "Unable to create instance of:
This is typically because you have no access to the desktop subsystem from a Windows Service/IIS module in default configuration because it is running in a restricted context/principal."
In this service we are trying to open word file and save. Word.Application apps = new Word.Application(); apps.DisplayAlerts = Word.Enums.WdAlertLevel.wdAlertsNone; apps.Documents.Open(filename); Issue raises at here.
Can you provide some solution to fix this issue.