Results 1 to 7 of 7
  1. #1
    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.

  2. #2
    Join Date
    May 2009
    Posts
    258
    Hello HunterPT,

    Try the following:
    Accessing TWAIN scanner in VB

    Regards,

    Ax

  3. #3
    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

  4. #4
    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?

  5. #5
    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.

  6. #6
    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.

  7. #7
    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)

Posting Permissions

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