• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

11. Windows APIs > 11.7. Run the Application Associated with a Data File

11.7. Run the Application Associated with a Data File

Problem

You’d like to find a way to provide a list of existing files, allow users to select a file, and run the appropriate application for that file. Windows knows how to do this—for instance, when you double-click on a file with a .TXT extension in Explorer, Windows runs Notepad with that file. How can you provide this sort of functionality in your own applications?

Solution

Windows provides two API functions, FindExecutable and ShellExecute, that make running a related application possible from within Access. Both functions rely heavily on the Windows registry, which tracks the relationships between filename extensions and related executable programs.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint