无法转换“Microsoft.Office.Interop.Excel.ApplicationClass”类型的COM对象 [英] Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass'
问题描述
大家好,
无法将Microsoft.Office.Interop.Excel.ApplicationClass类型的COM对象转换为接口类型''Microsoft.Office .Interop.Word._Application'。此操作失败,因为对于具有IID{00020970-0000-0000-C000-000000000046}的接口的COM组件上的QueryInterface调用由于以下错误而失败:不支持此类接口(HRESULT异常:0x80004002
我收到此例外:
((Word._Application)WordApp).Quit();
请给我任何建议来解决它..
谢谢..
您好,
查看此链接: http://support.microsoft.com/kb/315981/en-us [ ^ ]
CType(WordApp,Word。 _Application).Quit()
祝你好运。
JAFC
< blockquote>不知道它是否会有所帮助,但请查看此帖子报告类似的公关oblem:
http://stackoverflow.com/questions/12957595/error- access-com-components [ ^ ]
问候。
Hi All,
Unable to cast COM object of type ''Microsoft.Office.Interop.Excel.ApplicationClass'' to interface type ''Microsoft.Office.Interop.Word._Application''. This operation failed because the QueryInterface call on the COM component for the interface with IID ''{00020970-0000-0000-C000-000000000046}'' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002
I am getting this exception at:
((Word._Application)WordApp).Quit();
please give me any suggestion to resolve it..
Thank you..
Hi,
Check this link: http://support.microsoft.com/kb/315981/en-us[^]
CType(WordApp, Word._Application).Quit()
Good luck.
JAFC
Don''t know if it will help, but check this post reporting a similar problem:
http://stackoverflow.com/questions/12957595/error-accessing-com-components[^]
Regards.
这篇关于无法转换“Microsoft.Office.Interop.Excel.ApplicationClass”类型的COM对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!