Click here to Skip to main content
15,885,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Why I am getting the error "Retrieving the COM class factory for component with CLSID {} failed due to the following error" on using MODI OCR?

I am extracting an image on a scanned document using Microsoft Office Document Imaging. I am implementing using VS 2008 and C#3.5.
I added the dll from another machine(interop.MODI.dll). MODI is not in the Microsoft Office Tools of my system.
My code is as follows:
Document modiDocument = new Document();
modiDocument.Create(filePath);
modiDocument.OCR(MiLANGUAGES.miLANG_ENGLISH,false,false);
MODI.Image modiImage = (modiDocument.Images[0] as MODI.Image);
string extractedText = modiImage.Layout.Text;
modiDocument.Close(true);
return extractedText;
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900