Open with my application

Posted on 2000-04-23
Last Modified: 2010-05-02
I have two questions here that are related.
1. How do I set the file association so that files open in my app?
2. How do I get the name of the file in my application?  As in, when the user double clicks a file, how can I get the name of the file that they double clicked?
Question by:points
  • 3
  • 2
LVL 14

Expert Comment

ID: 2742287

Create file Associations 

You can get the filename passed by using the Command function Like this:

   Dim X As String
   X = Command

LVL 14

Accepted Solution

mcrider earned 100 total points
ID: 2742297
Also see the following microsoft KB article:

HOWTO: Associate a File Extension with Your Application (Win32) 


Author Comment

ID: 2742305
Adjusted points from 50 to 100

Author Comment

ID: 2742306
That was fast.
You get more points!
LVL 14

Expert Comment

ID: 2742337
Thanks for the points! Glad I could help!


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

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

910 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

21 Experts available now in Live!

Get 1:1 Help Now