Hi,
I have a module that scans documents into a database. I am using a local (USB Connected) rather old scanner from Fujitsu. The code works perfectly and all files are scanned and stored as it should.
The customer has now requested that they want to scan across the network, not from a local scanner. The printer/Scanner is a Minolta printer/scanner. I have never done this before, so I am stuck.
My partial code below (with compliments from http://kbase.icbconsulting.com/vba/scan-documents-into-an-access-database). I have changed some code to comply to my conditions.
	
	
	
		
The issue is that when the code runs, it does not pick up the network printer / scanner and gives an error message that the WIA device is not found.
Any suggestions?
Thanks
Deon
 I have a module that scans documents into a database. I am using a local (USB Connected) rather old scanner from Fujitsu. The code works perfectly and all files are scanned and stored as it should.
The customer has now requested that they want to scan across the network, not from a local scanner. The printer/Scanner is a Minolta printer/scanner. I have never done this before, so I am stuck.
My partial code below (with compliments from http://kbase.icbconsulting.com/vba/scan-documents-into-an-access-database). I have changed some code to comply to my conditions.
		Code:
	
	
	blnContScan = True
intPages = 0
strTempFolder = "C:\Temp"
ScanStarted = "N"
Do While blnContScan = True
    DPI = 200
    PP = 1 'No of pages
    Set Scanner = Dialog1.ShowSelectDevice(WIA.WiaDeviceType.ScannerDeviceType, False, False)
    With Scanner.Items(1)
        .Properties("6146").Value = 1 'Colour intent (1 for color, 2 for grayscale, 4 for b & w)
        .Properties("6147").Value = DPI 'DPI horizontal
        .Properties("6148").Value = DPI 'DPI vertical
        .Properties("6149").Value = 0 'x point to start scan
        .Properties("6150").Value = 0 'y point to start scan
        .Properties("6151").Value = 8.27 * DPI 'Horizontal extent
        .Properties("6152").Value = 11.69 * DPI     'Vertical extent for letter
    End With
    Set img = Dialog1.ShowTransfer(Scanner.Items(1), wiaFormatJPEG, True)
    'Set img = Scanner.Items(1).Transfer(WIA.FormatID.wiaFormatJPEG)
    intPages = intPages + 1
    strFileJPG = strTempFolder & "\" & strFileName & Trim(Str(intPages)) & ".jpg"
    If FSO.FileExists(strFileJPG) Then
        FSO.DeleteFile (strFileJPG)
    End If
    Set FSO = Nothing
    img.SaveFile (strFileJPG)
    DoCmd.SetWarnings False
    DoCmd.RunSQL "insert into scantemp (picture) values ('" & strFileJPG & "')"
    DoCmd.SetWarnings True
    Set Scanner = Nothing
    Set img = Nothing
    strFileJPG = ""
    ScanStarted = "Y"
    'Prompt user if there are additional pages to scan
    'ContScan = MsgBox("Scan another page?", vbQuestion + vbYesNo, "Continue...?")
    'If ContScan = vbNo Then
    '    blnContScan = False
    'End If
LoopThe issue is that when the code runs, it does not pick up the network printer / scanner and gives an error message that the WIA device is not found.
Any suggestions?
Thanks
Deon
 
	 
 
		 
 
		