Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002

    Unanswered: WIA device error

    Hi all.

    I am using Access 2007 on an XP machine. I have an application that uses a scanner to scan marriage licenses. A button in the app starts the scanner. The current scanner is shot and I am trying to get a new one working, a Canon dr-2010c. When I try to scan with the new scanner I get this:

    Run-time error '-2145320939 (80210015)

    No WIA device of the selected type is available.

    How do I get the app to see this new scanner?

    Here's the code:

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

    'wiadev = "{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0003"

    If wiadev Is Nothing Then
    ' WiaDev is defined globally
    Code fails here
    Set wiadev = WiaObj.ShowSelectDevice(WIA.WiaDeviceType.ScannerD eviceType, True, False)

    End If

    Dim itm As WIA.Item
    Dim ItmProp As WIA.Property
    Dim items As WIA.items
    Set items = WiaObj.ShowSelectItems(wiadev)
    For Each itm In items
    For Each ItmProp In itm.Properties
    Select Case ItmProp.PropertyID
    Case 6147: ' Horizontal Resolution
    ItmProp.Value = 200
    Case 6148: ' Vertical Resolution
    ItmProp.Value = 200
    Case 6151: ' Horizontal Extent (Scanning Area)
    ItmProp.Value = 1691
    Case 6152: ' Vertical Extent (Scanning Area)
    ItmProp.Value = 1402
    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
    Set WiaImg = WiaObj.ShowTransfer(itm)
    If WiaImg.FormatID <> wiaFormatJPEG Then
    Dim IP 'As New ImageProcess
    Set IP = CreateObject("Wia.ImageProcess")

    IP.Filters.Add IP.FilterInfos("Convert").FilterID
    IP.Filters(1).Properties("FormatID").Value = wiaFormatJPEG
    Set WiaImg = IP.Apply(WiaImg)
    'Set v = WiaImg.FileData
    WiaImg.SaveFile "\\Clio\cntyclerk_x$\MarriageProgram\MLImages\ " & lblFrontName

    Me.ImgSFront.Picture = "\\Clio\cntyclerk_x$\MarriageProgram\MLImages\ " & lblFrontName

    End If

    Thanks for the help.


  2. #2
    Join Date
    Jun 2012
    Hi. I've just encountered the same problem myself. Have you found a solution for this problem?
    I'm in the process of checking this myself with our system administrators, but if you still have the problem, have you checked that the correct WIA driver is installed for the device?
    If you have managed to solve the issue, could you please post the solution. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts