Remote Scanning in VBA-VBForums
Results 1 to 5 of 5

Thread: Remote Scanning in VBA

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2009
    Posts
    2

    Remote Scanning in VBA

    I have a form in a VBA program that I am (or rather "was" as it doesn't work anymore) using to scan in documents to.
    I have an ActiveX Control Object on the form where the scanned document is displayed once it has been scanned in.
    Also, I have an ImageMan Twain Control (which I think must be there so that any attached scanner can be detected :I didn't actually write the code on the form so I can't tell).
    I have a button called "Select Source" from where the scanner is selected.
    The code behind it is:

    Code:

    Private Sub cmdSelectScanner_Click()
    ImTwain1.SelectScanner
    End Sub

    "ImTwain1" is the ImageMan Twain Control object I referred to earlier.
    Th trouble is it is not detecting the scanner when this "cmdSelectScanner" button is clicked.
    Nothing happens under this event, but it used to work before. What might be a factor is that the scanner it is using is a remote scanner attached to another PC.
    The PC that the scanner is attached to connects to a server via remote desktop and then the program the form is on runs on the server.
    The server does not have a scanner attached to it but it should pick up the scanner on the client as there is software called RemoteScan which allows this to work.
    If I open Microsoft Document Image Scanning on the server over the remote desktop connection, it detects the scanner fine, just not in the form in the program I am using.
    So the RemoteScan software is working perfectly, it is a problem with the
    ImageMan control.
    I tied re-registering the dll's that the form uses ("ImTwain8.ocx" and "IMACTX80.ocx") but that didn't work.
    Has anyone out there any experience using Remoter Scanning and VBA?
    (I have attched an mdb with the form in zipped format)

    Is there any other way of using a Twain scanner in VBA other than the way shown above?
    Any other Image controls that I could use?
    Thanks for any replies.
    Attached Files Attached Files
    Last edited by fonzi; Jan 2nd, 2009 at 04:57 AM.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    20,003

    Re: Remote Scanning in VBA

    you would need your code to run on the pc with the scanner, it is not relevant what dlls run on your machine as they are not used for the scanning, the remote desktop runs the scanning on the pc with the scanner, even if they are saved to your computer
    you could try adding a remote desktop control (msrdp.ocx) to your form, to see if you can use that to do the scanning, but this may be beyond the scope of vba
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2009
    Posts
    2

    Re: Remote Scanning in VBA

    Quote Originally Posted by westconn1
    you would need your code to run on the pc with the scanner, it is not relevant what dlls run on your machine as they are not used for the scanning, the remote desktop runs the scanning on the pc with the scanner, even if they are saved to your computer
    you could try adding a remote desktop control (msrdp.ocx) to your form, to see if you can use that to do the scanning, but this may be beyond the scope of vba
    My apologies, I probably didn't make myself very clear:the PC I am on (let's call it PC 1) has the scanner attached to it. This PC connects to another PC (let's call this PC 2) by Remote Desktop.
    PC 2 has the mdb that contains the form attached to my original post.
    This mdb is the program that calls the scanner (over remote desktop).

    The scanner is actually attached to PC 1. PC 2 does not have a scanner attached to it.
    Putting a remote desktop control on the form would not make a difference as
    at I am already connected by Remote Desktop when I am on the form.
    As you quite rightly point out, the dll's must be registered on PC 2 as this is the PC that calls the scanner.
    With the RemoteScan software, PC 1 is the server (this has the scanner attached) and PC 2 is the client.
    It's just in the remote desktop PC 2 is the server and PC 1 is the client.
    It worked OK before as when the code under "cmdSelectScanner" is called it detected the remote scanner but not anymore.
    I don't know why.
    I searched through the forum and found a reference to another dll called "EZTW32.DLL" that does what I want but I couldn't register it.

  4. #4
    New Member
    Join Date
    Oct 2010
    Posts
    1

    Re: Remote Scanning in VBA

    Depending on your budget you could purchase a remote desktop scanning solution which has twain datasource mapping.

    Basically what we have done is that we purchase Remote Scan TSScan.
    and installed it. It created TWAIN datasources on our remote desktop server which mapped the local scanners.

    We than just used the standard twain code to retrieve the images from those
    virtual datasources.

    There are other product out there but they are pretty expensive.

  5. #5
    New Member
    Join Date
    Nov 2010
    Posts
    1

    Re: Remote Scanning in VBA

    Another alternative is VirtualScan support is US based and they are constantly adding hardware devices that they support. Aside from scanners they support Signature pads, webcams, Digital Check Scanners and the list keeps growing.

    Also, when you call you get a live person.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.