PDA

View Full Version : Requesting 3rd Party OCR API Recommendations for Office 2010 (VBA 7.0)



BruceA@WSIB
11-21-2012, 07:44 AM
Hi Guys,

OCR has been deprecated between Office 2007 and Office 2010.

What third-party API can be added to Office 2010 (VBA 7.0) to provide the missing OCR capability?

I'm looking for a few recommendations, including pros and cons of each.

Here's the VBA code which used to work perfectly in Office 2007 (VBA 6.0), but fails in Office 2010 (VBA 7.0).



Dim midoc As MODI.Document
Dim FiletoCheck As String
Dim DocPages

Set midoc = New MODI.Document
FiletoCheck = UserForm1.Label1.Caption
midoc.Create FiletoCheck
DocPages = midoc.Images.Count '<== This works perfectly!
midoc.Images(0).OCR '<== This method used to work in VBA 6.0, but doesn't work in VBA 7.0 - Work around is needed here

fumei
11-21-2012, 12:57 PM
If you have 2007, you can use its MODI code. See if this helps.

http://msmvps.com/blogs/steveb/archive/2010/10/12/missing-your-microsoft-document-imaging-in-office-2010.aspx

BTW, where are you getting the version number for VBA 6.0 and 7.0? I have not heard of these version numbers.

macropod
11-21-2012, 05:27 PM
See: http://support.microsoft.com/kb/982760

macropod
11-21-2012, 05:32 PM
BTW, where are you getting the version number for VBA 6.0 and 7.0? I have not heard of these version numbers.
Sub Test()
MsgBox Application.VBE.Version
End Sub
(needs trusted access to the vba project model)

Returns 6.05 in Word 2003, 7.00 in Word 2010.

fumei
11-21-2012, 06:20 PM
Really? I did not know they came up with a new engine for 2010. OK, makes sense I guess.