>Now it works
Glad to hear you worked it out.
>thanks again,
>my problem was elsewhere. I created the object in a method and it worked the first time, a second time failed.and just nulling to object after ocring did not help ither :-(
>
>
>So I add the object in the load of the screen, in my OCR method I open the tif file, ocr it and then CLOSE() it.
>Now it works
>
>
>Peter
>
>>Perhaps this will help
>>
>>
http://www.mydigitallife.info/2007/05/13/how-to-open-mdi-microsoft-document-imaging-format-with-office-2007/>>
>>
http://blog.opsan.com/archive/2007/02/17/350624.aspx>>
>>>Hi Mike
>>>0
>>>Thanks! As always you are right on the money!
>>>It works great - on XP
>>>I does not work for me on my brand new Dell Precision M90 with Vista Ultimate and 4GB of memory!!
>>>
>>>it creates the object alright but when assigning the image it give a ole error. It seems to think the tif file is corrupted
>>>The same files work fine on the inspiron 1705 with XP -sp2
>>>
>>>Any ideas?
>>>
>>>Peter
>>>
>>>
>>>
>>>>Here is an example using Microsoft Document Imaging
>>>>
>>>>
Local miDoc,miLayout,lcStr
>>>>lcStr=''
>>>>CREATE CURSOR mydocument (mydococr m)
>>>>miDoc = Createobject('MODI.Document')
>>>>miDoc.Create( "C:\untitled.tif")
>>>>miDoc.Images(0).OCR
>>>>miLayout = miDoc.Images(0).Layout
>>>>strLayoutInfo ="Language: " + Transform(miLayout.Language )+Chr(13)+Chr(10)
>>>>strLayoutInfo=strLayoutInfo+"Number of characters: " + Transform(miLayout.NumChars)+Chr(13)+Chr(10)
>>>>strLayoutInfo=strLayoutInfo+"Number of fonts: "+ Transform(miLayout.NumFonts )+Chr(13)+Chr(10)
>>>>strLayoutInfo=strLayoutInfo+"Number of words: " + Transform(miLayout.NumWords)+Chr(13)+Chr(10)+Chr(13)+Chr(10)
>>>>strLayoutinfo = strLayoutinfo+miLayout.text
>>>>INSERT INTO mydocument (mydococr) VALUES (strLayoutinfo)
>>>>MODIFY MEMO mydocument.mydococr
>>>>
>>>>
>>>>
>>>>
>>>>>VFP SP2
>>>>>
>>>>>
>>>>>I need to ocr EXISTING .TIF FILES.
>>>>>Has anyone done this? Is there some free stuff which can be called from VFP?
>>>>>
>>>>>Peter