Scan document; hyperlink to record

texasgrandma

New member
Local time
Today, 05:08
Joined
Apr 14, 2008
Messages
9
We are wanting to have our entry form open; click a button that scans a document; to a pdf file; then attaches a hyperlink to that pdf to that record.

If that record was ever retrieved; we could simply double-click the hyperlink to access the pdf file.

Is this possible? Could you give us some recommendations?

Thanks in advance.
 
Simple Software Solutions

Hi Grandma,

How's your VBA skills? Yes this can be done, as I do it now.

Things to take into consideration.

Does all users have a scanner attached to the pc?
Have you got any ocx controls that will allow scanning and converting to pdf?
Are you handling the naming and saving conventions?
Is the mdb a FE-BE setup.?
Is it multi user LAN/WAN based?
How many documents are we taking about in a year?
Are they single or mutli pages?

Answer these questions and I will be able to help you further.

CodeMaster::cool:
 
Questions answered?

How's your VBA skills? AVERAGE (on a scale of 1 to 10; a 5)

Does all users have a scanner attached to the pc? (only 1 computer with 1 scanner needed at "checkin location"; database on LAN; PDF available to other 3 PCs)

Have you got any ocx controls that will allow scanning and converting to pdf? (do not know?)

Are you handling the naming and saving conventions? (We want the "checkin location" to name the file at prompt [LastName]_[FirstName]_[current date])

Is the mdb a FE-BE setup.? YES

Is it multi user LAN/WAN based? YES

How many documents are we taking about in a year? 300

Are they single or mutli pages? Single

Hi Grandma,

How's your VBA skills? Yes this can be done, as I do it now.

Things to take into consideration.

Does all users have a scanner attached to the pc?
Have you got any ocx controls that will allow scanning and converting to pdf?
Are you handling the naming and saving conventions?
Is the mdb a FE-BE setup.?
Is it multi user LAN/WAN based?
How many documents are we taking about in a year?
Are they single or mutli pages?

Answer these questions and I will be able to help you further.

CodeMaster::cool:
 
Simple Software Solutions

Right

First of all you will need some scanning software. The one I use is
OLYMPUS TWAINWizard v1.6.0.0 - google it and download the software.

Install on pc.

Add to your access references.

Next create a form (see splash1) with the relevant controls

Image control - to view the results

4 buttons (Select Source) Scanner, Scan,Save,Close

2 Text boxes to show saved file path and name

Enter the following code behind the controls.

The code attached is used in Visual Basic 6.0 but will also work in Access.

Some functions have been excluded but these do not affect the ability to scan.

Get this bit working then we will move on to the next stage.

CodeMaster::cool:
 

Attachments

  • Splash1.JPG
    Splash1.JPG
    42.3 KB · Views: 415
  • ScanCode.txt
    ScanCode.txt
    2.4 KB · Views: 461
Scan; PDF; to Access

Thanks....it will be a couple of weeks before I start this project. Thanks for the "startup" directions!

Right

First of all you will need some scanning software. The one I use is
OLYMPUS TWAINWizard v1.6.0.0 - google it and download the software.

Install on pc.

Add to your access references.

Next create a form (see splash1) with the relevant controls

Image control - to view the results

4 buttons (Select Source) Scanner, Scan,Save,Close

2 Text boxes to show saved file path and name

Enter the following code behind the controls.

The code attached is used in Visual Basic 6.0 but will also work in Access.

Some functions have been excluded but these do not affect the ability to scan.

Get this bit working then we will move on to the next stage.

CodeMaster::cool:
 
Actually, I may be able to use this sooner. I am working on a project that does OCR on scanned docs, but this might make us start the project at the scan point instead of after the docs are already scanned. Thanks Mr. Codemaster, sir!
 
Simple Software Solutions

Hi Grandma,

If we asume, as you indicated you are now in a postion where you have already got a list of files in a known folder.

The first thing we need to do is to make the contents of the folder visible to the user via a form.

So we create a form with a list box on it with 3/4 columns

File name
Path name
Date Last Modified
File type

I have attached a module that will retreive the above and display in a list box.

The next step is to be able to double-click on an item in the list box and get Access to launch it in the appropriate software. (Adobe, Word, Excel, Wordpad, etc) This will depend on the filter you place on the file retrieval code.

Place the following code on the Double-Click Event of the listbox

Code:
Dim sPath As String
Dim sFile As String
Dim StrFile As Stirng

    sPath = Me.ListBox.Column(0)
    sFile = Me.ListBox.Column(0)
    StrFile = sPath & "\" & sFile



    nDT = GetDesktopWindow()
    nApp = ShellExecute(nDT, "Open", strFile, "", "C:\", SW_SHOWNORMAL)
    DoEvents


You will also need the following declarations either in your form or in a module.


Code:
Private Declare Function ShellExecute Lib "shell32.dll" _
   Alias "ShellExecuteA" _
   (ByVal hWnd As Long, ByVal lpszOp As String, _
    ByVal lpszFile As String, ByVal lpszParams As String, _
    ByVal LpszDir As String, ByVal FsShowCmd As Long) _
    As Long
Private Declare Function GetDesktopWindow Lib "User32" () As Long

Const SW_SHOWNORMAL = 1

On the form load you will need to call the function that loads the files onto your list box for the user to select from, thus:

Code:
Private Sub Form_Load()
        Call FSOFindFiles(sPath, "*.*")
End Sub

Where sPath is the target folder and *.* is the filter type

Hope the instructions are clear enough

David
 

Attachments

Dave, I have business group in my company who is looking for a simple process to log invoices they receive into an Access form, and have the ability to scan these documents to be saved as PDF files and place in a shared network folder rather, than actually storing them in the database.

Which bring me to your posted thread of some time ago. I believe your solution is just what they need. I have followed your instructions and codes but, I cannot seem to get it working correctly. I have attached a sample of your review and assistance. I am new to VBA coding so I know it is me.

Any help would be greatly appreciated.

Thank you,

Jerry
 

Attachments

Users who are viewing this thread

Back
Top Bottom