Document scanning using WIA

D

Daniel

Hi,

Im using WIA components to scan documents to my application.
The trouble is the code works with some scanners & computers and doesn't
work with others.

Here's the code and a specific problem:

Dim s As String
Dim dlg As New WIA.CommonDialog
Dim tmpFile As New MODI.Document
Dim MainDoc As MODI.Document
Dim i As Integer

MainDoc.Create "Tmp.TIFF"
s = "Tmp.JPG"
dlg.ShowAcquireImage(ScannerDeviceType, UnspecifiedIntent, MinimizeSize,
wiaFormatJPEG, True, False, False).SaveFile s
'If Quality > 0 Then ChangeImageQuality tmpFile, Quality
tmpFile.Create s
For i = 1 To tmpFile.Images.Count
MainDoc.Images.Add tmpFile.Images(i - 1), Nothing
Next i


The problem:
A scanner (MUSTEK 1200UB Plus) is connected to my computer and works OK.
The same scanner connected to another computer opens the scanning dialog,
after I select the scan type (Color\ Gray etc.) the small window of
"Transferring data" apears and immidiately dissapears.

The scan is not completed of course.
I don't get any error message (@!#$%)
Other scanners work OK.

any ideas ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top