使用Interop.MODI抛出0x80040154异常 [英] Using Interop.MODI Throws 0x80040154 Exception

查看:1607
本文介绍了使用Interop.MODI抛出0x80040154异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正试图实现Interop.MODI.dll(从Microsoft Office)使用图像 - >文本功能,它应该提供。
但是当做

I am currently trying to implement the Interop.MODI.dll (From Microsoft Office) to use the Image -> Text features it should Provide. But when doing

var modi = new MODI.DocumentClass();

我得到:


COMException 80040154 with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B}。

"COMException 80040154 with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B}".

我尝试解决这个问题?

我使用regasm工具注册了DLL:
- 问题仍然存在

I registered the DLL using the regasm tool: -Problem still exists

我尝试将BuildPlatform设置为x86:
- 仍然存在的问题

I tried setting the BuildPlatform to x86: -Problem still exists

我使用Visual Studio 2010 Ultimate Windows 7专业64位&已安装Microsoft Office 2007

编辑:我找到了解决方案:


我需要安装MS-Office-Document-Imaging功能到MS
Office,使它工作。 (软件 - > MS Office(右键 - >编辑)
- >添加功能 - > Microsoft Office Document Imaging)

I needed to install the "MS-Office-Document-Imaging" feature to MS Office to get it working. (Software -> MS Office (rightclick -> edit) -> Add Features -> Microsoft Office Document Imaging)


推荐答案

尝试检查 Microsoft Office文档映像组件是否正确安装。

Try to check if Microsoft Office Document Imaging Components are installed correctly.

您可以通过修改Microsoft Office安装来实现。

You can do that by modifying your Microsoft Office Installation

软件>编辑Microsoft Office安装>添加/删除组件
确保 Office-Tools> Microsoft Office Document Imaging

Software > Edit Microsoft Office Installation > Add/Remove Components. Be sure, that Office-Tools > Microsoft office Document Imaging is installed completely!

此外,如果您正在64位机器上开发,请将您的项目输出从任何CPU x86

Furthermore, if you are developing on a 64-bit machine, change your project output from any CPU to x86

这篇关于使用Interop.MODI抛出0x80040154异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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