Answer the question
In order to leave comments, you need to log in
How to scan to MFP from tray via WIA (VBA)?
Sub scan()
Dim objCommonDialog As WIA.CommonDialog
Dim objImage As WIA.ImageFile
Dim dev As Device
Dim itm As Item
Dim dm As DeviceManager
Set objCommonDialog = New WIA.CommonDialog
Set dm = New WIA.DeviceManager
Set dev = objCommonDialog.ShowSelectDevice(ScannerDeviceType, False, False)
Set dev = dm.DeviceInfos(objCommonDialog.ShowSelectDevice.DeviceID).Connect
Set itm = dev.GetItem(dev.Items(1).ItemID)
Set objImage = objCommonDialog.ShowTransfer(itm)
If Not objImage Is Nothing Then
objImage.SaveFile "c:\test\" & ActiveCell.Value & ".TIF"
Set objImage = Nothing
End If
Set objCommonDialog = Nothing
End Sub
Answer the question
In order to leave comments, you need to log in
разобрался.
"objDev.Properties("Document Handling Select").Value = 1"
Полностью код в комментариях к вопросу
WIA ошибка при установке параметра PAGES (VBA). Почему?
Is it important to do this through VBA?
For such a task, many years ago I created a batch file
set Path=\\Server666\PASSPORTS\%date%
set Temp=c:\TMP6
md %Temp%
md %Path%
"C:\Program Files (x86)\IrfanView\i_view32. exe" /scanhidden /convert=%Temp%\001.gif
copy %Temp%\001.gif %Path%\%random%.gif
del %Temp%\001.gif /Q /F
scans through irfanview, scan settings are set there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question