I am using WIA to automate a scanning process. The scanner I am using is an HP 5550C with an automatic document feeder. I can scan one page using the ADF, but it only scans the first page. I looked at the WIA driver for this scanner, and it does not give any options dictating how many pages to scan. I believe I have to do it within the WIA code. The only command I can find to do this is the WIA_DPS_PAGES property. This property is supposed to be a property of the WIA object, but I am unable to locate it and figure out how to use it. I have search the forum and also googled it, with no success. Can anyone give me an example on how to use this property?

Thanks

__________________
The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents

It would be hard to help out considering I do not have the scanner you're trying to interface with, and it would be great if someone with specialist knowledge on the subject could jump in here, but seen as nobody has replied yet I'll give it a shot.

Do you have a copy of the API library you're using to try and achieve this, and if so, what about any supporting documentation? Also, the code you're using at the moment to scan pages would be great as it could be something much simpler than a problem with your API coding.

Ok, I was wrong. The code I posted only worked once or twice. Now when I run the previously posted code, it runs thru the for statement the first time correctly. Then on the second time thru the for loop I get an error of "Value does not fall within the expected range" on the line img = Item.Transfer 'transfers the image. Does any one have any ideas on what could be causing this? Not sure if this helps or not, but the Inner exception doesnt show anything.

I did comment out the autocrop routine to make sure that it had nothing to do with some other code that is not posted.

Any help is really appreciated.

__________________
The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents

Ditto... any update... same problem with a HP Officejet 7310 all in one printer.
First document pass from the feeder is ok, then I get the error "value does not fall within expected range".

Interesting thing I noticed(probably unrelated but stating it anyway), if a single document is in the feeder everything works excellent. If more than one document is in the feeder, the first document image is complete, but the feeder doesn't seem to eject the document and I get the error stated above.

If DeviceID = "" Then
RaiseEvent ReportState("No Device Specified. Showing all devices. User please select a scanner to use.")
Set WiaDev = WiaObj.ShowSelectDevice(WIA.WiaDeviceType.ScannerDeviceType, True, False)
Else
RaiseEvent ReportState("Device that will be used: " + DeviceID)
Dim manager As DeviceManager
Set manager = New DeviceManager
Dim d As Device
Set d = Nothing
Dim info As DeviceInfo
For Each info In manager.DeviceInfos
If (info.DeviceID = DeviceID) Then
RaiseEvent ReportState("Connecting To Device")
On Error Resume Next
Set d = info.Connect
If Err.Number <> 0 Then
RaiseEvent ReportState("Error Connecting To Device")
Exit For
End If
Set WiaDev = d
Exit For
End If
Next

I got an email notification that someone had posted a question about the code I submitted but it doesn't seem to appear in the list. Anyway I'll answer as best I can. My code is actually VB6 rather than VB.net so I hope it's not off topic. I think VB.net people will still find the code useful.

Bhavesh,

It sounds like your using .net rather than VB6 so you might have to make some changes.