Link to home
Start Free TrialLog in
Avatar of AlexF777
AlexF777

asked on

Duplex scanning with EZTWAIN

Hi,
               I am trying to do duplex scanning with EZTWAIN. No luck so far.
               Hope to get some help.

Thank You,
-Alex




Option Explicit

Dim intCompletionCode As Integer
   
Private Sub Command1_Click()
   TWAIN_SetHideUI (1)  ' request no UI
   If (TWAIN_GetDuplexSupport() = 0) Then
       MsgBox (" nO DUPLEX")
       End
   Else
       TWAIN_SelectFeeder (1)
       TWAIN_EnableDuplex (1)
   End If
   
   intCompletionCode = TWAIN_AcquireToFilename(0, "C:\Scanning\Yes.tif")
   Select Case intCompletionCode:
      Case 0
         MsgBox (" Success !!! ")
      Case -1
         MsgBox ("The Acquire failed")
      Case -2
         MsgBox ("File Open Error (Invalid path or name, or access denied)")
      Case -3
         MsgBox ("Invalid DIB, or image incompatible with file format, or ...")
      Case -4
         MsgBox ("Writing Failed, possibly output device is full.")
      Case -10
         MsgBox ("User cancelled File Save Dialog")
      Case Else
         MsgBox ("Unknown Error: " & intCompletionCode)
   End Select
   If (TWAIN_UnloadSourceManager() <> 0) Then
       MsgBox ("eRROR")
   End If
End Sub

Private Sub Form_Load()
   If (TWAIN_OpenSource("FUJITSU fi-4120Cdj") <> 1) Then
       MsgBox ("Could not Open Scanner, Exiting ... ")
       End
   End If
End Sub

ASKER CERTIFIED SOLUTION
Avatar of SoftEng007
SoftEng007

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