We're trying to use .NET Outlook automation in windows service. It is running under system account.
When trying to call outlook.CreateItemFromTemplate()
or outlook.Session.OpenSharedItem()
(here outlook
is an instance of Outlook application) it fails with exception "Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))".
Service has "Allow service to interact with desktop" option enabled.
This code works just fine when called from usual Win32 application, but not in service running under system account. Does anybody have any suggestions/workarounds how to make it work under system account?
User contributions licensed under CC BY-SA 3.0