ACC: How to Start Doc with Windows API ShellExecute() Function This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
This article was previously published under Q121157 On This PageSUMMARY
Advanced: Requires expert coding, interoperability, and multiuser skills.
You can use the Windows application programming interface (API) ShellExecute() function to start the application associated with a given document extension without knowing the name of the associated application. For example, you can start the Microsoft Paintbrush program by passing the file name ARCADE.BMP to the ShellExecute() function. MORE INFORMATION
The following example demonstrates how to start an application or load a
document into its associated application. The Windows API ShellExecute()
function is different from the Access Basic Shell() function in that you
can pass the ShellExecute() function the name of a document and it will
start the associated application and then pass the filename to the
application. You can also specify the working directory for the
application.
NOTE: In the following sample code, an underscore (_) at the end of a line is used as a line-continuation character. Remove the underscore from the end of the line when re-creating this code in Access Basic.
NOTES
REFERENCES
For an example of how to use the Windows application programming interface
(API) ShellExecute() function to start the application associated with a
given document extension without knowing the name of the associated
application in Microsoft Access for Windows 95 version 7.0, please see the
following article in the Microsoft Knowledge Base:
148632 (http://support.microsoft.com/kb/148632/EN-US/) ACC: Start Files or Hyperlinks with Windows API ShellExecute() Microsoft Windows SDK "Programmer's Reference, Volume 2: Functions," pages 901-904 APPLIES TO
| Article Translations
|


Back to the top
