Results 1 to 2 of 2
  1. #1
    Daisy509th's Avatar
    Daisy509th is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Central Texas
    Posts
    51

    Calling a Scanner

    I am trying to put a command button on a form that will allow the user to scan a document to pdf. I would also like to set pdf file name by using VBA and combo boxes. I really want to also use vba to set file path for where to save pdf. This path will change depending on combo boxes values.



    What I am finding on the web says its possible but no real example.



    Thanks

  2. #2
    Daisy509th's Avatar
    Daisy509th is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Location
    Central Texas
    Posts
    51
    Public Sub GetImage()
    Dim FileLocation As String
    Dim diagFile As FileDialog
    Set diagFile = Application.FileDialog(msoFileDialogSaveAs)

    diagFile.Title = "Save Scan Image As ..."
    diagFile.InitialFileName = ".pdf"

    If diagFile.Show Then
    FileLocation = diagFile.SelectedItems(1)

    Dim scanDiag As New WIA.CommonDialog
    Dim image As WIA.ImageFile

    Set image = scanDiag.ShowAcquireImage(1)
    image.SaveFile FileLocation

    End If

    End Sub

    Ok, I got the above code to work but not the way I needed it to work.
    It saved image as a .bmp
    It also didnt let me have the options to pick my scansnap ix500 it only allowed me to pick my hp flatbed

    Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using a Scanner to input data
    By lamore48 in forum Access
    Replies: 4
    Last Post: 01-31-2018, 01:00 PM
  2. Barcode Scanner Invalid Scan
    By nick243 in forum Access
    Replies: 2
    Last Post: 06-13-2016, 02:09 PM
  3. Barcode scanner
    By Business in forum Programming
    Replies: 1
    Last Post: 05-22-2016, 08:48 AM
  4. attach scanner to access
    By msasan1367 in forum Access
    Replies: 3
    Last Post: 03-14-2013, 10:52 AM
  5. IDCard Scanner substring
    By torpid in forum Programming
    Replies: 3
    Last Post: 05-30-2011, 07:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums