Link to home
Start Free TrialLog in
Avatar of lnwright
lnwright

asked on

VB6 WIA Scanner Interface Problem With Document Feeder

Hi,

I have an interface that I had written in VB6 for HP Scanjet 6300 with auto document feeder.   The code scans the first page OK but then generates an error when it is suppose to load the next page.

The error I get is "438 Object doesn't support this property or method"  and this is the line that causes it:

NextNextWiaImg = WiaObj.ShowTransfer(itm)


Here is the rest of the code:



Private Sub cmdScan_Click()
Dim WiaObj As New WIA.CommonDialog
Dim WiaItm As WIA.Item
Dim WiaImg As New WIA.ImageFile
Dim wiadev As WIA.Device

If wiadev Is Nothing Then
' WiaDev is defined globally
Set wiadev = WiaObj.ShowSelectDevice(WIA.WiaDeviceType.ScannerDeviceType, True, False)
End If

Dim itm As WIA.Item
Dim ItmProp As WIA.Property
For Each itm In wiadev.Items
For Each ItmProp In itm.Properties
Select Case ItmProp.PropertyID
Case 6147:   ' Horizontal Resolution
            ItmProp.Value = 150
Case 6148:   ' Vertical Resolution
            ItmProp.Value = 150
Case 6151:   ' Horizontal Extent (Scanning Area)
            ItmProp.Value = 1275
Case 6152:   ' Vertical Extent (Scanning Area)
            ItmProp.Value = 550
Case 6149:   ' Horizontal Starting Position (Scanning Area)
            ItmProp.Value = 0
Case 6150:   ' Vertical Starting Position (Scanning Area)
            ItmProp.Value = 0
Case 6146:   ' Current Intent
            ItmProp.Value = 4
            ' Text or Line Art
End Select
NextNextWiaImg = WiaObj.ShowTransfer(itm)
Next
Next
ASKER CERTIFIED SOLUTION
Avatar of junglerover77
junglerover77

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial