在Windows 10上初始化Outlook Application时没有COMException. [英] There is a COMException when initialize Outlook Application on Windows 10.

查看:189
本文介绍了在Windows 10上初始化Outlook Application时没有COMException.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I have a program need administrator permission, so I set in app.manifest file like below:

< requestedExecutionLevel level =" requireAdministrator" uiAccess =假". />

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

此程序在初始化Outlook应用程序时出现异常:

This program got an exception when initialize Outlook Application:

Microsoft.Office.Interop.Outlook.Application oOutlook =新的Microsoft.Office.Interop.Outlook.Application();

Microsoft.Office.Interop.Outlook.Application oOutlook = New Microsoft.Office.Interop.Outlook.Application();

例外:

&; 其他信息:由于以下错误,未能获取具有CLSID {0006F03A-0000-0000-C000-000000000046}的组件的COM类工厂:80080005服务器执行失败(HRESULT异常:0x80080005(CO_E_SERVER_EXEC_FAILURE)). style ="color:#333333; font-family:'Segoe UI',Arial,sans-serif; font-size:15px">&;

Additional information: Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))."

我认为原因可能是Outlook 2013以标准用户默认身份运行于

I think the reason may be Outlook 2013 run as a standard user default on Windows 10, but my program run as administrator. They have different level permission.

如果我不修改Windows 10系统默认设置.如何在程序中获取Outlook Application.

If I don't modify Windows 10 system default settings. How can I get Outlook Application in my program. Thank you very much!

推荐答案

您好,Stella 1386 Li,

Hi Stella 1386 Li,

谢谢您在这里发布.

您的问题是什么类型的项目?

For your question, what is the type of your project? 

Microsoft当前不建议并且不支持Microsoft Office自动化来自任何无人参与,非交互客户端应用程序或组件的应用程序 (包括ASP,ASP.NET,DCOM和NT服务),因为在这种环境下运行Office时,Office可能表现出不稳定的行为和/或死锁.

Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

会发生以下错误 .


这篇关于在Windows 10上初始化Outlook Application时没有COMException.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆