Tip

OCR: Abbyy FineReader integration

It's really easy to enhance your applications with optical character recognition (OCR) using Abbyy's popular FineReader application. The code below has been tested with FR4 but should work with later versions too (using 'CreateObject("FineReader.Application")').

Just insert a button with the code below in your form design and start to scan RTF text into Notes Body field directly.

PS: If s/o has any information about the help file 'frapi.hlp' please let me know - I'm convinced FineReader could even be more closely integrated. But although I have a regular FR license this file wasn't provided.


Sub Click(Source As Button)
 On Error Goto ErrorHandler 
 
 Dim ws As New NotesUIWorkspace
 Dim uidoc As NotesUIDocument
 Dim appFR As Variant
 
 Set uidoc = ws.CurrentDocument
 Set appFR=CreateObject({FineReader.Application.4})
 
 If appFR Is Nothing Then
  Msgbox {Couldn't find FineReader4 on the local system!}
  Exit Sub
 End If
 appFR.DoCommand (73) 'scan+read single page
 appFR.DoCommand (12) 'copy to clipboard
 appFR.Quit
 Call uidoc.GotoField({Body})
 Call uidoc.Paste 'insert clipboard contents
 
TheEnd:
 Exit Sub
ErrorHandler:
 Messagebox {An unexpected error has occured: } & Trim$(Str(Err)) & {: } & Error$, 0+48+0+0, {Error Message..}
 Resume TheEnd 
End Sub

This was first published in September 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.