Solved

Open With... API

Posted on 2002-03-08
6
179 Views
Last Modified: 2010-05-02
I'm looking for code (API or OCX) that will enable me to use microsoft's Open With... dialog - the one used to get a user to identify what exe to use when openning a file of and unknown type.
0
Comment
Question by:alaplume
  • 4
6 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6851181
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 200 total points
ID: 6851186
Open With  
module: SHELL32.DLL  
command: rundll32.exe shell32.dll,OpenAs_RunDLL {drive:\path\filename}
result: displays the application/file "Open With" dialog
result: passing the full file drive, path and name as a parameter will cause the dialog to display the line "Click the program you want to use to open the file '{filename}'".
 

 

0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6851189
Sorry you could use last code with Shell function or with Shellexecute API.
Hope it helps
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 4

Expert Comment

by:trkcorp
ID: 6851244
Like Richie says; use ShellExecute API.
0
 
LVL 1

Author Comment

by:alaplume
ID: 6866276
It did the job!
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6867653
Then, why you punished me with "B" grade?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

912 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

16 Experts available now in Live!

Get 1:1 Help Now