无法将类型为“Microsoft.Office.Interop.Outlook.InspectorsClass”的COM对象强制转换为类类型 [英] Unable to cast COM object of type 'Microsoft.Office.Interop.Outlook.InspectorsClass' to class type

查看:191
本文介绍了无法将类型为“Microsoft.Office.Interop.Outlook.InspectorsClass”的COM对象强制转换为类类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法将类型为

Unable to cast COM object of type

'Microsoft.Office.Interop.Outlook.InspectorsClass'转换为类类型

'Microsoft.Office.Interop.Outlook.InspectorsClass' to class type

'Microsoft.Office.Interop.Outlook.InspectorsClass'。

'Microsoft.Office.Interop.Outlook.InspectorsClass'. Instances of types that

的类型实例表示COM组件不能转换为表示COM的不同类型

represent COM components cnnnot be cast to different types that represent COM

组件;但是只要基础

COM组件支持对接口的IID的QueryInterface调用,它们就可以转换为接口。

COM component supports QueryInterface calls for the IID of the interface.

您好

我有一个用户正在使用我们的MS Office插件for outlook,它允许他们将电子邮件保存到我们的EDRMS系统。

I have a user that is using our MS Office plugin for outlook which allows them to save emails to our EDRMS system.

用户已成功在测试机上安装了该插件,但每当他现在打开Outlook时,他都会收到上述错误。

The user has installed the plugin on a test machine successfully, but whenever he opens outlook now, he gets this error above.

任何想法?

谢谢

Greg

推荐答案

Hello Greg,

Hello Greg,

看起来您正在尝试将COM对象强制转换为任何托管类型。要了解原因,我建议在代码中添加任何日志记录机制,这样您就可以看到最终用户计算机上发生了什么,并找到确切的代码行。

It looks like you are trying to cast a COM object to any managed type. To understand the cause I'd suggest adding any logging mechanisms to the code, so you could see what happens on an end user machine and find the exact line of code where it happens.

你试着调试代码?

什么行代码准确触发异常?

What line of code exactly fires an exception?


这篇关于无法将类型为“Microsoft.Office.Interop.Outlook.InspectorsClass”的COM对象强制转换为类类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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