473,394 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to control scanner from Access?

Can anyone point me to VB/VBA code that will control a TWAIN-compliant
scanner?

Jan 8 '06 #1
8 35096
> Can anyone point me to VB/VBA code that will control a TWAIN-compliant
scanner?


I found this:

http://www.microsoft.com/downloads/d...ng=en#filelist

and got this to work:

Public Function scan()
'Required reference: Microsoft Windows Image Acquisition Library v2.0
Dim objDlg As Object
Dim objMgr As Object
Dim i As Integer

Set objDlg = CreateObject("WIA.CommonDialog")
Set objMgr = CreateObject("WIA.DeviceManager")

For i = 1 To objMgr.DeviceInfos.Count
Debug.Print objMgr.DeviceInfos(i).Properties("Name").Value & vbCrLf &
_
"[ " & objMgr.DeviceInfos(i).DeviceID & " ]"
Next

End Function

developing...

Jan 8 '06 #2
Then WIAAutSDK readme file says:

"The Windows Image Acquisition Library v2.0 is only designed to support the
PNG, BMP, JPG, GIF and TIFF image formats. It should not be relied upon to
support other formats, though they may appear to be supported depending on
system configuration."

Is it possible to get PDFs? Why can't I get PDF from WIA?

After WAI produces a TIFF, can it be programmatically converted to PDF?
How?

Jan 8 '06 #3
"deko" <de**@nospam.com> wrote in
news:5v********************@comcast.com:
After WAI produces a TIFF, can it be programmatically converted to
PDF? How?


A PDF created from a TIFF is going to be nothing more than a thin
wrapper around a copy of the TIFF.

Do you want to OCR the contents and then create a PDF, with
searchable text? That's more complex and my bet is that there's
nothing COM automatable available.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 8 '06 #4
If you are using Office 2003 then the included MODI App has built in OCR
and can load Tif files. One of the interfaces is an ActiveX control that
does work on an Access form. I've only tested the OCR capabilites on a few
(fax) TIF files but I was amazed at the accuracy.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in message
news:Xn**********************************@127.0.0. 1...
"deko" <de**@nospam.com> wrote in
news:5v********************@comcast.com:
After WAI produces a TIFF, can it be programmatically converted to
PDF? How?


A PDF created from a TIFF is going to be nothing more than a thin
wrapper around a copy of the TIFF.

Do you want to OCR the contents and then create a PDF, with
searchable text? That's more complex and my bet is that there's
nothing COM automatable available.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Jan 8 '06 #5
> If you are using Office 2003 then the included MODI App has built in OCR
and can load Tif files. One of the interfaces is an ActiveX control that
does work on an Access form. I've only tested the OCR capabilites on a few
(fax) TIF files but I was amazed at the accuracy.


I discovered MODI only because it was the default app for opening a TIFF
file. Pretty cool, and the OCR is accurate as you say. The question 'to
PDF or not to PDF' now becomes political/cultural one. If everyone can open
a TIFF as easily as a PDF (and you don't need all the embedded bells and
whistles) why bother with PDF? The only reason, as far as I can see (and as
Adobe CEO Bruce Chizen would want everyone to believe), is that PDF is the
only truly portable document format - that is, in the minds of users: "if
it's not Word or PDF, you can't open it". That misguided idea is the
catalyst behind the request that led me down this road in the first place.

I'll have to look into MODI a bit further...

Jan 9 '06 #6
Br
deko wrote:
If you are using Office 2003 then the included MODI App has built
in OCR and can load Tif files. One of the interfaces is an ActiveX
control that does work on an Access form. I've only tested the OCR
capabilites on a few (fax) TIF files but I was amazed at the
accuracy.
I discovered MODI only because it was the default app for opening a
TIFF file. Pretty cool, and the OCR is accurate as you say. The
question 'to PDF or not to PDF' now becomes political/cultural one. If
everyone can open a TIFF as easily as a PDF (and you don't need
all the embedded bells and whistles) why bother with PDF? The only
reason, as far as I can see (and as Adobe CEO Bruce Chizen would want
everyone to believe), is that PDF is the only truly portable document
format - that is, in the minds of users: "if it's not Word or PDF,
you can't open it". That misguided idea is the catalyst behind the
request that led me down this road in the first place.


It's probably be much easier to "steal" the text from a Tiff than a
protected PDF....
I'll have to look into MODI a bit further...

--
regards,

Bradley

A Christian Response
http://www.pastornet.net.au/response
Jan 9 '06 #7
> If you are using Office 2003 then the included MODI App has built in OCR
and can load Tif files. One of the interfaces is an ActiveX control that
does work on an Access form. I've only tested the OCR capabilites on a few
(fax) TIF files but I was amazed at the accuracy.


One way to describe MODI is a TIFF viewer on steroids. While TIFF is a
viable alternative to PDF, if you want to read the TIFF 6.0 Specification
you'll need Adobe's Acrobat Viewer. This is because Adobe owns the
copyright and is effectively the custodian for standard. Still, TIFF is a
scanner-friendly format and a good choice for document imaging.

As for scanner automation from Access, the question (as evidenced by this
thread) leads to a consideration of document imaging: once you acquire an
image, what do you do with it?

This is where Microsoft shows it's strength. Thanks to Ballmer's
"Developers, Developers, Developers" idea, we have things like WIA and MODI.
Both have well documented object models and are easily integrated into
Access. Granted, it's all Microsoft-centric stuff, but I want a solution
not (necessarily) an open source standard.

One thing I found interesting is that ScanSoft (a speech and imaging
technology company now known as Nuance, based in Burlington, MA) developed
the OCR component in MODI. Can anything good come from Massachusetts?

Some helpful sites:

http://www.ilixis.com/developer/modi.html

http://home.earthlink.net/~ritter/tiff/#whatis

Jan 9 '06 #8
> If you are using Office 2003 then the included MODI App has built in OCR
and can load Tif files. One of the interfaces is an ActiveX control that
does work on an Access form. I've only tested the OCR capabilites on a few
(fax) TIF files but I was amazed at the accuracy.


Another useful critter in the MODI tool set is MSPSCAN.EXE - the Microsoft
Office Document Scanning utility. It looks like a front end to WIA. For
the type of document scanning we do, it's all that's needed. I'll be glad
to get rid of PaperPort (a major PITA).

But the MODI VBA Language Reference says: "MODI automation provides powerful
document management and OCR features; however, it does not automate the
document scanning process itself or support image annotation."

So, for what I'm trying to do, I'll need to automate WIA rather than MODI.
This means writing my own MSPSCAN. The one thing I'm not sure how to
replicate is the link to the scanner driver that allows stuff like scanning
multiple page documents with an automatic document feeder. In MSPSCAN, when
the multiple page document option is selected, the scanner's driver/utility
is called and that interface (not MSPSCAN) is used to configure the ADF.

My guess is there's a DLL (viceo.dll?) that was installed with the scanner
driver that I'll need to figure out how to use.

Jan 9 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Harmony407 | last post by:
Hello: I am currently creating a database in which a user can scan an image into MS Access. The images once scanned, will be held in a seperate table. Here is my problem. The scanner is not...
9
by: Dan =o\) | last post by:
Hey guys, I wonder if you could please provide me with some ideas as to how to get around this problem. Symbol MC9000-k, Pocket PC 2003... With a scanner application I've written, data is...
0
by: terryrey | last post by:
Hi, I've got a winform control that is using Twain and which works fine in a windows application. I am now trying to get this hosted and running in IE6 for our intranet app but am running into...
11
by: Ron L | last post by:
I have a barcode scanner which uses a "keyboard wedge" program so that the data it scans comes through as if it was typed on a keyboard. I am trying to have the data in the barcode be displayed in...
2
by: Anders | last post by:
Hi Im trying to develop a C# application which interacts with a Fingerprint scanner. The appliaction is going to run in the background (and as trayicon). When my applicatons catches an...
3
by: Budhi Saputra Prasetya | last post by:
Hi All, I'm currently trying to embed .NET Custom Control into my ASP .NET. The control call FindWindow and BringWindowToTop function of Win32 API that is wrapped under another DLL file. I...
7
by: DemonWasp | last post by:
I've been having some trouble getting the Scanner class to operate the way I'd like. I'm doing some fairly basic file IO and I can't seem to get the class to load the last line/token any way I try....
0
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in...
3
by: thename1000 | last post by:
Hi, I'm trying to create this output: Input team 1's name: Team 1 Input team 1's ranking: 90.4 etc.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.