Mike_Burns67
Registered User.
- Local time
- Today, 04:11
- Joined
- Oct 8, 2008
- Messages
- 11
Hi all
Long time reader, first time poster ;-)
I've been struggling with a piece of code for Access for a few days and am totally stuck.
I have a piece of code (thank you utteraccess.com) that opens the dialog box up for a PnP scanner I have connected to this PC; the code is;
'---
Dim commondialog1 As Object
Dim img As image
Set commondialog1 = CreateObject("wia.commondialog")
Set img = commondialog1.showacquireimage
img.savefile ("c:\test.jpg")
'---
the first 3 lines work perfectly, the scanner's dialog box loads and allows me to scan an image, but as soon as the scan is complete I get a "runtime error 13" on line 4
Also the savefile bit on line 5 doesnt seem to be recognised as a valid method so I'm guessing even if it didnt error on line 4 it would not be happy anyway.
Lastly, and this may be the crux of the matter...
I downloaded and registered the WIA DLL from Microsoft, but it doesnt appear in the ActiveX controls as WIA library 2.0 - as Microsoft suggests, but the DLL is showing as the control for the "commondialog class", the "devicemanager class" and the "wia video preview class".
Can anyone shed any light on this?
Long time reader, first time poster ;-)
I've been struggling with a piece of code for Access for a few days and am totally stuck.
I have a piece of code (thank you utteraccess.com) that opens the dialog box up for a PnP scanner I have connected to this PC; the code is;
'---
Dim commondialog1 As Object
Dim img As image
Set commondialog1 = CreateObject("wia.commondialog")
Set img = commondialog1.showacquireimage
img.savefile ("c:\test.jpg")
'---
the first 3 lines work perfectly, the scanner's dialog box loads and allows me to scan an image, but as soon as the scan is complete I get a "runtime error 13" on line 4
Also the savefile bit on line 5 doesnt seem to be recognised as a valid method so I'm guessing even if it didnt error on line 4 it would not be happy anyway.
Lastly, and this may be the crux of the matter...
I downloaded and registered the WIA DLL from Microsoft, but it doesnt appear in the ActiveX controls as WIA library 2.0 - as Microsoft suggests, but the DLL is showing as the control for the "commondialog class", the "devicemanager class" and the "wia video preview class".
Can anyone shed any light on this?