Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello,

I am trying to convert a jpeg image to text using OCR library with the source code provided on below link
Converting Images to Text using Office 2007 OCR, OpenXML and Speech Recognition[^]

But i get the below annoying exception every time i do
md.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH,true,true);

Exception message is:-
Object hasn't been initialized and can't be used yet.

I tried converting directly from Microsoft document imaging application using Tools --> Recognize Text using OCR. It works perfectly fine.

Any help would be sincerely appreciated.

Thanks in advance.
Posted
Updated 15-Feb-11 17:33pm
v2

could you please convert the JPEG into tiff and then try running same code!
 
Share this answer
 
Comments
Alok d gr8 16-Feb-11 20:22pm    
Thanks for reply.
Tried with tiff files also, but with no luck.
Peace be upon you! I was getting the same exception, then I found out what i was doing wrong during installation Microsoft office document imaging. i.e "Run from my computer" option.
So, the solution that worked for me is, run Microsoft Office 2007 setup, select add or remove feature, then from "installation options" window, expand "office tools", Right click "Microsoft office document Imaging " and click the second option i.e., "Run all from my computer". Click Continue, and as do as directed to install it. After that Exception won't com at OCR function line.
 
Share this answer
 
run as administrator and it will work well. I don't known why.
 
Share this answer
 

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