Home > Back-end >  Delphi xe3 Windows 7 how to call Microsoft MODI OCR? Try the along while didn't succeed
Delphi xe3 Windows 7 how to call Microsoft MODI OCR? Try the along while didn't succeed

Time:09-23

I am the following:

One, according to a post on the BBS I installed the Microsoft Modi Ocr:
1. Install the Office 2007 (using custom installation, choose Microsoft Office Document Imaging related project)
2. Installing Office 2007 SP2 (can't install SP2 please install a Windows Installer 4.5)
3. Install Microsoft MODI identify component installation package

Two, add a form in Delphi, and cited in the USES Comobj,

Three, in the form to add a memo and a button, the button code:

Var
Doc, layout: the Variant;
I: integer;
STR: string;
The begin
Doc:=CreateOleObject (' MODI. Document);
If OpenDialog1. Execute then
Try
Doc. Create (OpenDialog1. FileName);
Screen. The Cursor:=crHourGlass;
Doc. OCR (1028);
Screen. The Cursor:=crDefault;
For I:=0 to doc. Images. Do the Count - 1
The begin
STR:=STR + doc. Images. Item [I] Layout. The Text;
end;
Memo1. Lines. Text:=STR;

ShowMessage (' Finished! ');

Doc. Close;
Doc:=the UnAssigned;

Except on E: the Exception do
ShowMessage (e. oString);
end;


Four, compiler, click on the button has been submitted to the "not registered", ie, it has a problem: doc. Create (OpenDialog1. FileName);




Do successful friends advice me, this thing bothering me for a long time, thank you

CodePudding user response:

Does anyone know? Please check it, thank you!

CodePudding user response:

Management tools - & gt; Component services - & gt; DCOM configuration, see the Microsoft Office Document Imaging is there,

CodePudding user response:

refer to the second floor DelphiGuy response:
administrative tools - & gt; Component services - & gt; Have DCOM configuration, see the Microsoft Office Document Imaging,

I looked at it and there is no this item:


But I'm sure to install Microsoft Office Document Imaging and its sp2 and identify the core, could you tell me how should solve
  • Related