Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Pete B Pete B is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Pete B Pete B is offline
external usenet poster
 
Posts: 2
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I get Multiple instances of word? Laverne Microsoft Word Help 14 November 17th 06 01:35 PM
Automatic Font Change In Word 2007 Doug Microsoft Word Help 12 November 14th 06 04:23 PM
Is there any add-on for Open Document Text file ? Jason New Users 2 October 29th 05 09:39 PM
OT - some useful info Cynthia Microsoft Word Help 2 June 10th 05 02:31 AM
Why won't Microsoft develop method for all fractions? KGlennC Microsoft Word Help 11 March 23rd 05 06:58 AM


All times are GMT +1. The time now is 05:36 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"