Graphic Program

kevsim

Registered User.
Local time
Today, 11:47
Joined
Aug 10, 2002
Messages
34
I have developed links in my database, so when pressed it will take you to a particular graphic. My problem is, most of the graphics were developed in MGI PhotoSuite and when the graphic is selected, PhotoSuite opens to display the graphic.
I have selected the graphic in the file, right clicked, and selected Open With and choose Paint Shop Pro, which opens the graphic. When I click the graphic in Access, PhotoSuite opens the graphic and not Paint Shop Pro as selected. The graphics are in MPG and BMP format, is there any way the graphic can be opened in Paint Shop Pro from within the database. Your advise would be appreciated.
kevsim
 
You need to incorprate the Shell function with the opening of your graphic files to ensure your program of choice is used to open your files. Check the help files for the Shell function for more info but here is an example.

Call Shell("C:\Program Files\PaintShopPro\PSP.exe C:\My Graphics\GraphicFile001.mdb", vbMaximizedFocus)

Of course you will have to use a string to replace the "GraphicFile001.mdb" with the chosen file.

HTH
 
ghudson, Thank you for providing the info. I typed the code as follows in the text box with the hyperlink. The code is in the On Click event of the text box-
Private Sub Text102_Click()
Call Shell("C:\Program Files\Paint Shop Pro 6\PSP.exe C:\My Documents\Special\Photos\Model.jpg", vbMaximizedFocus)
End Sub
Paint Shop Pro opens, then a message box “Unable to open the file”, at the same time the program MGI Photo Suite appears. As soon as I press the OK button on the message box, Paint Shop closes. I can close MGI first and it closes, same thing happens when I press the OK button, PSP closes. In all cases the graphic file does not appear. If I choose Graphic.psp and using the code changing jpg to psp, the message box still appears with the same message, however, the graphic appears in the background, when I press OK on the message box, PSP closes. Also, how can I use a variable selecting the file? Could you please assist a little further.
kevsim
 
Not sure why but when I tried the same code to open a graphic with the Microsoft Photo Editor I can only get the program to open but not with the graphic file of my choice. But when I tried the same thing with a different program (IrfanView), it opens the program and loads the graphic. Go figure??? Maybe it is because the program is too old to undestand what to do with the Call Shell command.

What program are your BMP and JPG files associated with? If you double left click the graphic file from Widows Explorer, what program loads the graphics? If not PSP, then you need to associate the specific graphic types (file extensions, .jpg, .bmp) with PSP. PSP should have a built in option to associate specific files types to the program.

Post back after you have confirmed that your graphic files are associted with PSP and the Call Shell command still does not work for you.

Good luck!
 
ghudson, I had previously tried what you suggested and it works great outside Access, however, when opened in Access it keeps reverting to the original program. What I did find was, type new, then advance options, type in the file extension, then look for the program you wish to use, select, click OK, then OK again, all works well in and out of Access.
kevsim
 
Do you want edit or only view the pics. If you only want to view maybe the attachment may help
Dave
 

Attachments

Oldsoftboss, Thank you for the interest, the attachment would be handy.
kevsim
 

Users who are viewing this thread

Back
Top Bottom