Link to home
Start Free TrialLog in
Avatar of doddwell
doddwellFlag for United Kingdom of Great Britain and Northern Ireland

asked on

MODI Document for multiple users

Hello
I am using the Microsoft Document Imaging Control to view scanned invoices.  All works fine if only one user is trying to look at an invoice.  If another person tries to view the same invoice the document will not load because it has already been opened by the first user.

How can I get around this?  I am using the following code to load my invoice image:

Private Sub GetImage_Click()
Me.ctlDoc1.FileName = "C:\InvFileName.mdi"
end sub

I have thought about creating a temporary copy of the invoice and then loading this into the viewer...but there must be another way.

Pls advise
Avatar of thenelson
thenelson

You can use MDIC to scan and save to a tiff instead of a mdi.  Or try using http://www.irfanview.com/ to scan, save and view the file.  It will allow several people to view the same file at the same time and has command line parameters you can call with shell to automate the scanning, viewing, etc.
Avatar of doddwell

ASKER

thenelson, tried it using a tif file and I get the same problem.  Had a look at irfanview but don't want to use a 3rd party viewer....want to stick to using Modi.

I think I need some way of opening the document as read-only.
You can try using M$ Office Snapshot viewer.  Just like MDIC, it comes with office but is read only.  An additional advantage is it is available back to at least Office 2000 (MDIC is only available for 2002+).  Instead of the .mdi extension, you would use the .snp extension.
I want to continue to use modi.  I have decided to check to see if the image is already open by someone else and, if it is, tell the user taht it is locked and can't be opened (it will be a rare occurrence).  If this does become a problem, I'll change things so that before opening, a temporary copy of the file is taken and that will be the one that gets opened.
ASKER CERTIFIED SOLUTION
Avatar of thenelson
thenelson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial