Solved

Opening Photoshop and 3dStudio Max files

Posted on 2000-04-28
2
137 Views
Last Modified: 2010-05-02
I want to write an application where I have a list of path names to particular files stored in Photoshop or 3dstudio.  This list of these are displayed on the screen and I want to click on one of them and have it open the document in an already open copy of the target application.  i.e. I have a JPG in My documents and already have open Photoshop, so when I click on the document I want it to open it in that instance of Photoshop.  How?
0
Comment
Question by:MrTimewalk
2 Comments
 
LVL 3

Accepted Solution

by:
paulstamp earned 50 total points
Comment Utility
What you need to do use the ShellExecute API. The Declaration is

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

And you would call it like this :

Call ShellExecute(Me.hwnd, "open", "c:\mypic.psd", vbNullString, "c:\", sw_shownormal)

This will open the file specified (mypic.psd), using the root of C as working directory, in whatever program is registered for files of type "PSD"

Likewise if you passed in a "c:\mypic.bmp" it would open whatever is associated with BMP files.

It will open it in the current instance of the program if there is one there, otherwise will create an instance
0
 

Author Comment

by:MrTimewalk
Comment Utility
I'll try this and see how it goes thanks
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now