2012-07-13 102 views
1

当我尝试初始化对象为:初始化OutlookEmail对象给出了从HRESULT异常:0x80029C4A(TYPE_E_CANTLOADLIBRARY)

OutlookEMail email = new OutlookEMail(MailType); 
在C#

我得到异常:

Unable to cast COM object of type 'Microsoft.Office.Interop.Outlook.ApplicationClass' to interface type 'Microsoft.Office.Interop.Outlook._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00063001-0000-0000-C000-000000000046}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

使用Microsoft Office(前景)2007 有人可以帮助解决这个问题吗?我在这个确切的同样的错误

+0

看起来你错过了一个DLL,或者它是你系统的错误格式。 – AlG 2012-07-13 11:24:36

+0

which exactly dll – Edgar 2012-07-13 11:27:24

+0

查看[ApplicationClass的文档](http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.applicationclass.aspx)它应该有帮助 – AlG 2012-07-13 11:34:13

回答

0

,只有它,当我跑的代码最简单的路线:

var outlookApp = new Microsoft.Office.Interop.Outlook.Application(); 

我尝试了各种修正建议像运行“修复”和注册的各种组件。解决的办法是将我的项目目标从“任何CPU”改为“x86”。我在32位Office上运行Windows 8.1 64位。