If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Using VBA to scan documents

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: May 2009
Posts: 15
Using VBA to scan documents

Hi, I'm searching for code that would allow me to just click on a button (that would have the code OFC) and the scanner would scan the document, give it a name, and automatically save it to a predestined folder. As anyone come across this? I have searched for vba code that involved WIA but was not able to find any that worked on vba, can anyone show me to the basic code to do this?

Thank you.
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: May 2009
Posts: 258
Hello HunterPT,

Try the following:
Accessing TWAIN scanner in VB

Regards,

Ax
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: May 2009
Posts: 15
Thank you, that is even better than I was expecting since it has no extra .dll, the only "problem" that I can see so far is the size of the images, although is not a problem for me I can definitely see someone needing to add code to convert the image files since 1,90mb for only 75DPI is kind of steep, anyway that's completely offtopic once again thank you.
I'm now almost done with my code that automatically scans, automatically names, automatically archives and automatically links it to the DB
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: May 2009
Posts: 15
Hi, I just run into a problem I have more than one scanner and every time I use the other one the one that I selected before stops being the default one, so does anyone know how can I modify the module to always use the same scanner?
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Jul 2009
Posts: 7
Maybe i'm a bit late, but you still can try the AccessImagine component - it can do all the things you need without any programming.

You just press Scan button, and component scans the document, automatically names it, saves it as jpeg to some location and inserts the filename to DB.

Beside that, AccessImagine shows smooth images and produces perfect 300-dpi printouts when it comes to reports printing.
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: May 2009
Posts: 15
Thank you for the link, however I have used the twain module and it's doing pretty much everything I want it to.
Reply With Quote
  #7 (permalink)  
Old
Moderator
 
Join Date: Dec 2004
Location: Madison, WI
Posts: 3,925
Since this is usually dependant upon the printer driver, couldn't you just set the printer driver (in code)?

I can't recall the syntax to do this but it's fairly easy.

I would do it to set the print driver to the Adobe Acrobat Writer driver to save as pdf files.
__________________
Expert Database Programming
MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On