Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Microsoft Office Document Imaging(MODI) - VB6/.Net does it work?
I have written some simple VB to read a folder of tif images and
perform OCR on them and output the text to a text file. Everytime I try to execute the code in VB6 I get the message IO Error and are unable to create the document/ open a tif. I put the same code into msaccess 2003 and it worked straight away. Does anyone know if this is limited to work in Office 2003? will it work in VB6 or .Net? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Microsoft Office Document Imaging(MODI) - VB6/.Net does it work?
Someone suggested i place the code I am using :-
Private Sub Command0_Click() Dim fso As Scripting.FileSystemObject Dim fldr As Scripting.Folder Dim f As Scripting.File Dim midoc As MODI.Document Dim miLayout As MODI.Layout Dim txtstream As Scripting.TextStream Dim filenameStr As String Set fso = New Scripting.FileSystemObject Set fldr = fso.GetFolder(Text1) Set midoc = New MODI.Document For Each f In fldr.Files If UCase(Right(f, 3)) = "TIF" Then filenameStr = f midoc.Create filenameStr midoc.OCR miLANG_ENGLISH, True, True Set miLayout = midoc.Images(0).Layout filenameStr = Left(f, Len(f) - 4) & ".txt" Set txtstream = fso.OpenTextFile(filenameStr, ForWriting, True) txtstream.WriteLine miLayout.Text End If Next Set miLayout = Nothing Set midoc = Nothing Set txtstream = Nothing End Sub Pete B wrote: I have written some simple VB to read a folder of tif images and perform OCR on them and output the text to a text file. Everytime I try to execute the code in VB6 I get the message IO Error and are unable to create the document/ open a tif. I put the same code into msaccess 2003 and it worked straight away. Does anyone know if this is limited to work in Office 2003? will it work in VB6 or .Net? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why can't I get Multiple instances of word? | Microsoft Word Help | |||
Automatic Font Change In Word 2007 | Microsoft Word Help | |||
Is there any add-on for Open Document Text file ? | New Users | |||
OT - some useful info | Microsoft Word Help | |||
Why won't Microsoft develop method for all fractions? | Microsoft Word Help |