Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Is the file in the correct folder?


    Perhaps (just guessing) there is an issue with the spaces and/or punctuation within the proposed file name.

    Can you show us your latest code?

  2. #17
    christ2000 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    45
    Hello. sure:

    Private Sub Command493_Click()
    Dim Filepath As String
    Dim CName As String
    CName = Forms![ContractorsDBForm]![Text442]
    filename = Me.DocumentsName & ".pdf"
    Filepath = DLookup("[ContractorPath]", "querysetup") & CName & DLookup("[expr1]", "querysetup")
    Debug.Print CurrentProject.Path & "\quickscan.exe resolution 100 pdf showprogress filename " & Filepath & CName & " " & filename & ""


    End Sub

    and the result on debug.print is correct as show bellow:

    C:\ClientsDB\SBPM\quickscan.exe resolution 100 pdf showprogress filename C:\ClientsDB\SBPM\Alain, Tom\Alain, Tom 101 Employment contract.pdf

  3. #18
    christ2000 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    45
    ALso i was testing another solution and work ok, but the problem is that using WIA the scanner just pull first page and stop. i cant find a solution to scan pull all pages using WIA

    this is the code fot WIA solution

    Private Sub Command488_Click()
    Dim diagFile As FileDialog
    Dim Filepath As String
    Dim CName As String

    On Error GoTo err_chk

    Set diagFile = Application.FileDialog(msoFileDialogSaveAs)


    CName = Forms![ContractorsDBForm]![Text442]
    filename = Me.DocumentsName & ".pdf"
    Filepath = DLookup("[ContractorPath]", "querysetup") & CName & DLookup("[expr1]", "querysetup")



    diagFile.title = filename
    diagFile.InitialFileName = "" & Filepath & CName & " " & filename & ""

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


    Dim scanDiag As Object
    Dim image As Object

    Set scanDiag = CreateObject("WIA.CommonDialog")
    Set image = CreateObject("WIA.ImageFile")

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

    Set image = scanDiag.ShowAcquireImage()
    image.SaveFile fileLocation

    End If
    ExitCommand488_Click:
    Exit Sub
    err_chk:
    If Err.Number = 91 Then

    Resume ExitCommand488_Click
    Else
    MsgBox Err.Number & ": " & Err.description

    End If
    End Sub

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. No idea where to begin
    By Kkennedy in forum Database Design
    Replies: 2
    Last Post: 09-18-2017, 07:11 AM
  2. Replies: 4
    Last Post: 10-22-2016, 07:47 PM
  3. Access Conceptual Table Idea
    By NickWren in forum Access
    Replies: 8
    Last Post: 01-15-2016, 01:23 PM
  4. Replies: 1
    Last Post: 08-03-2012, 12:32 PM
  5. Can I use Access for this Idea?
    By sandiego5 in forum Access
    Replies: 5
    Last Post: 11-17-2011, 09:14 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