Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Interop.MODI Throws 0x80040154 Exception

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();

I get:

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

What have I tried to solve that problem?

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

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

I use the Visual Studio 2010 Ultimate with Windows 7 Professional 64Bit & Have Microsoft Office 2007 installed

EDIT: I found the Solution:

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)

like image 244
Stefan Schnitzler Avatar asked Nov 21 '11 15:11

Stefan Schnitzler


1 Answers

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

You can do that by modifying your Microsoft Office Installation

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

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

like image 70
reinizzle Avatar answered Oct 12 '22 19:10

reinizzle