J
Ja
I've converted a database from 97 to 2003 - it comes up with an error - file
not found when i use shell "\DIR\File.pdf"
not found when i use shell "\DIR\File.pdf"
\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.
David W. Fenton said: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).
will this work in Access 97 - The computers this database runs on
is using Access 97.
Any particular preference to that API over FollowHyperlink? (Just
asking: I usually use the API, but since it's easier to use
FollowHyperlink I've started recommending that instead)