Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Document Scanning Help 2

Status
Not open for further replies.

gator9

Technical User
May 17, 2002
162
US
Hello again!

Ok let me see if I can explain what I am trying to accomplish. I am building a filing system and scanning all documents onto my computer. Now what I want to know is if there is a way that I could build a form with an OLE object and a command button so that when I clicked the command button it would activate the scanner thus scanning the image and storing that image in a file outside the database in a file folder of my choosing. Now as it is scanning and storing the file I would like to be able to see the image being displayed in the OLE bound field. After all that when the document is scanned if I decided I want to scan another document it will add that document as number two so I can view each image separately in the OLE field. OLE may not be the way to go I just need some guidance in the write direction. I know it is possible can anyone help.


Sincerely,

Charles
 
Charles,

I wrote an Access MDE that does what you are suggesting. However, both storing the image in the database as well as the file system are pretty simple tasks. So, let me point you in a couple of directions and you decide...

#1 Kodak Image Edit/Scan Controls
These controls are built into Windows 2000 or you can download them (they are free). You can add references in Access and program against their object models. There is extensive documentation at msdn.microsoft.com regarding programming methods.

#2 DBPix Image Control
This control is an all-in-one control. It can import and export images to and from a database to a file system. It also has an operation specifically to scan images. If you need a quick and dirty solution, this is a great way to go as it keeps coding to minimum. My preferred method of the DBpix control is to store the image in the database, which I recommend as this control does not store any overhead of the images in the database, unlike other MS methods.

Good luck!

Gary
gwinn7e
A+, N+, I+
 
Private Sub Scan_Click()

Call Shell("C:\Program Files\Common Files\Microsoft Shared\MSPaper\MSPSCAN.exe", 1)

End Sub

Above is the code that will activate the document scanner I want to use in inserting the scanned doc’s into my database. I know I can right click on the OLE object and choose a program to do this but I would like to be able to do it all in one. I would like to be able to click on the scan button and choose the type of scan from the program then have it scan the doc then have it insert that scan into the OLE object. Is that possible?

Sincerely,

Charles
 
What you are seeking is possible through one of the methods I suggested, but I don't see how your code above is going to get what you want.

The Shell function simply calls an outside program. Why not create form and place the Kodak controls on it, then through code behind a command button, scan the document and preview it through the control on the form?

Gary
gwinn7
A+, N+, I+
 
I couldn't find the Kodak controlls on XP or the web or I would have tried that.

Sincerely,

Charles
 
Im lookin for the same controls, cannot find them.. anybody have an idea i would like to implement the same feature. Thanks.
 
It would appear that the Kodak/Wang Image Edit controls are no longer supported under XP, ^$@#! If you have Windows 98/ME/2000, finding these controls would not be a problem.
That is really irritating as I am sure you found out, BUT...

Anyhow, these controls are now supported on XP through a replacement called, the "Microsoft Windows Image Acquisition Libray v2.0". To download these controls go to the following site...


Sorry to be the cause of undo frustration. Please feel free to post back to let me know it went.

Gary
gwinn7
A+, N+, I+
 
Gary, I found the control before you post but I was unable to get it to work. It tells me I need to have persistance. Any recommendations would be greatly appreciated. Thanks. David.
 
David,

I was able to install the library without problems. The instructions for installation were pretty easy and clear. I didn't attempt to actually use the control though. What did you do exactly to trigger your problem? Steps?

Thanks,
Gary
gwinn7
A+, N+ ,I+
 
I followed directions registered the control and when I attempted to goto the properties of the control I got that error. I've worked with activex controls before and never had that problem. any suggestions is greatly appreciated. Thanks again.
 
David,

I am at the office at the moment. Fortunately/unfortunately, we don't work with Windows XP here. My XP system is at home. So, my next reply hopefully will be this evening.

Gary
gwinn7
A+, N+, I+
 
Can a similar procedure be done using a Kodak digital camera, where the Kodak controls are placed in an Access form and when the camera user presses a button on the Access form, the camera takes a picture and stores the file in a specific place?

I work at a police department and we use a Kodak digital camera to take digital mugshots.

Thanks.
 
If the software for that camera has an exposed COM programming interface, it is likely, yes. You should look for something in your 'References' resembling Kodak or Wang or your camera software. Just open a code module and click 'Tools', then 'References'. If the item is not on the list, you may try browsing for the OCX or DLL that software exposes. That is, of course, you know the name of that control or DLL.

What you should look for is documentation on the software for your camera. If your camera is TWAIN compliant, then it is VERY likely you can use the Kodak Image Edit and Scan controls for this.

Hope that helps,
Gary
gwinn7
A+, N+, I+
 
jkirkland, exactly what I am looking to do. to the "T". Gary I know the kodak image and edit controls were with windows 2000, but i cannot find them for xp. I got the software for the camera and was able to find the active x controls. Now I have to get them to work. Thanks again. Jkirkland, I will let you know how I make out. Later. Stay safe.
 
Hey guys

I just found a solution that may help if you need to store your scanned documents and have MS Office. Office XP comes with a document scanning solution and you can select what folder all your scans are placed - now the good thing is it uses OCR and format for the documents are saved as TIF. With this I save all my scans by date and time and when I need to find a file I simple do a search by word and phrase and it will search and display the scanned items with the results of that search in other words it reads the document scanned and finds the word or phrase in the document. Hope this helps.

Sincerely,

Charles
 
All,

I successfully used a DLL called PajantImage ( This is a really inexpensive solution $39 to register and full re-distribution rights. Only problem I have is scanning multi-page documents. I can get it to scan one page at a time and save it either in the table or externally but I haven't actually figured out how to get to scan and save multiple pages. Here is some of the code I used, any help would be greatly appreciated:

Private Sub cmdAcquire_Click()
'This is the control that enables picking up the image on scanner

'Pajant.CreatInstance ((PajantImage))


With Me.PajantImageCtrl3

.Pi.TwainAcquire (0)

End With

End Sub

Private Sub
cmdSave_Click()
Dim strPath As String
Dim
bOK As Boolean
'This control saves the picture to a file
'for distribution this needs to be changed so administration has control
'See photoname_AfterUpdate




strPath = Me.OpenArgs

With Me.PajantImageCtrl3

bOK = .Pi.Save(strPath, 0)

End With

SetAttr strPath, vbReadOnly

SetAttr strPath, vbHidden

DoCmd.Close acForm, "FrmScanSetUp"

End Sub

Private Sub
cmdSelect_Click()
'This control allows selection of different twain sources

Me.PajantImageCtrl3.Pi.TwainSelect (0)

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top