Re: Cannot run a file from Access
- From: "David W. Fenton" <XXXusenet@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 11 May 2007 17:03:52 -0500
"Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx> wrote in
news:u2zhBy7kHHA.3280@xxxxxxxxxxxxxxxxxxxx:
\DIR\File.pdf isn't a complete reference to a file. You need
either a drive letter, or a \\server\share in front of that.
Are you sure? Won't Windows resolve it relative to the current
directory?
In testing, I found that any valid path that is begun *not* with a \
is OK, dependent on the current directory (CurDir() returns this).
So, if the directory named "DIR" is in the current directory, then
this should work:
Shell("Dir\ExecutableFile.exe")
Of course, how an argument passed to an executable is handled will
depend on how that executable is written.
In the case of trying to open a data file, I'd use the ShellExecute
API, instead (using Dev's HandleFile wrapper,
http://www.mvps.org/access/api/api0018.htm).
--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
.
- Follow-Ups:
- Re: Cannot run a file from Access
- From: Douglas J. Steele
- Re: Cannot run a file from Access
- From: Ja
- Re: Cannot run a file from Access
- References:
- Cannot run a file from Access
- From: Ja
- Re: Cannot run a file from Access
- From: Douglas J. Steele
- Cannot run a file from Access
- Prev by Date: The 3 Newes records
- Next by Date: Append query help
- Previous by thread: Re: Cannot run a file from Access
- Next by thread: Re: Cannot run a file from Access
- Index(es):
Relevant Pages
|