Open File

Ethereal

Warcraft III Player
Local time
Today, 08:08
Joined
Jan 17, 2006
Messages
99
How would i go about executing a file... say Test.avi, i would like it to exe just as if you were to double click it. Is there a way to do this ?
 
use the shell command. Depending upon what program you want to open the .avi...usually the windows system directory is already in the path statement so you execute the file using the Windows media player command line options:

Code:
varReturnValue = Shell("mplayer.exe ..." , vbSwitchOptions)
 
Ok, a little shakey on this. Code the shell command for opening test1.avi with windowsmediaplayer.exe just write "path" if there is supposed to be a path b4 these filenames
 
Searching the forum is a great way to discover and learn the answers to your Access programming questions.

I prefer to use the ShellExecute method to open a file. It does not have the problems and limitations that the Shell() function does.

I have a working example in my Browse [Find a directory or file] sample.
 

Users who are viewing this thread

Back
Top Bottom