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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening TIF files with code

Status
Not open for further replies.

MDJ52

MIS
Joined
Mar 30, 2001
Messages
120
Location
US
I came up with this little bit of code that I have tied to a View button on a form so that the users can lookup the file they want to view, and then click the view button. This has worked great for Win98 and Win2000 for a couple of years. We are now getting WinXP machines in and the Viewer is integrated into XP.
Is anyone aware of a way to execute the viewer with code such as I have shown below? Possibly using the rundll32.exe in XP?
Thanks for any Help
Mike

Dim stAppName As String
Dim callsolno As String
' Use for Windows 98
' stAppName = "C:\windows\KODAKIMG.EXE"
' Use for Windows2000
stAppName = "C:\Program Files\Windows NT\Accessories\IMAGEVUE\KODAKIMG.EXE"
Call Shell(stAppName, 1)
callsolno = "f:\file1\" & Forms!Main_form!LookUp & ".tif"

SendKeys "%F", True
SendKeys "O", True
SendKeys callsolno, True
SendKeys "%O", True
 
I don't know if this is of any use to you but I thought it might be worth considering.

329270 - You Cannot View TIFF Images Using Windows Picture and Fax Viewer

The following is from Lockergnome tips.

10th December 2001

Kodak did a wonderful job on their Imaging Application (which comes bundled with Windows 98 and Windows 2000). As I archived more and more black and white documents, I came to appreciate its power. Sadly, this utility does not exist in Windows XP. There's no KODAKIMG.EXE or KODAKPRV.EXE to be found! My heartfelt thanks goes out to Lockergnomaniac John Hunter, who found a solution for those of us who miss our dear old app. We agree that the new "Windows Picture and Fax Viewer" sucks. If you have a Windows 2000 CD, copy the following files from the disc: OCKODAK.DLL, OIENG400.DLL, OIPRT400.DLL, OISLB400.DLL, OISSQ400.DLL, OITWA400.DLL, OIUI400.DLL, IMGCMN.DLL, IMGADMIN.OCX, IMGEDIT.OCX, IMGSCAN.OCX, and IMGTHUMB.OCX. Note that these files may still be compressed in the "**_" format.

You will need to use either the EXPAND.EXE utility or WinZip to uncompress them. If you have a Windows 98 CD, copy those same files PLUS the following: OIADM400.DLL, OICOM400.DLL, OIDIS400.DLL, OIFIL400.DLL, OIGFS400.DLL, IMGSHL.DLL, and IMGOCXD.HLP. In both cases, you should place all of them inside your System32 folder. Now, it's time to register the OCX files. Tap Winkey+R to launch the Run applet and then enter: "regsvr32 imgadmin.ocx" (sans quotes). Do the same for imgedit.ocx, imgscan.ocx, and imgthumb.ocx. Remember, to unregister an ActiveX control, you only need to trail regsvr32 with the "/u" switch. Be sure you've copied over the aforementioned executables to your System32 folder. They should work now! NOTE: You may need to launch the Kodak program to see if there are any other files missing from this procedure.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top