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.SelectScannerEnd 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 theImageMan 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.
      Answer1: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
      Answer2:Quote:

0 comments:

Post a Comment

Copyright 2008