windows function to run software

  • Thread starter Thread starter Roy Goldhammer
  • Start date Start date
R

Roy Goldhammer

Hello there

Is there a way to run function from access that get name and path of file
and run software according to the file extention?
 
Look at the Dir function and Shell function in the Help file.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
Whell Steve

In shell function i can run any software on my computer

But i can't run simple text, excel or word file without applying the
softeware name.

For example:
this runction cause error:
shell("C:\text.txt")
could not find file:

but if i run it like this:
shell("Notepad C:\text.txt") it run great

i need global function that will run the software according to its
extention:

so i can also run function like this:
shell ("C:\text.pdf") and adobe reader will run
 
Hi Roy,

We could make the Shell function work but here's another idea --

You don't need a global function; just some code in the click event of a
button:
Dim FilePath As String
<< Use the Dir function to get the path >>
FilePath = .....
Application.FollowHyperlink FilePath

Lookup the Dir function in the Help file.

Steve
 
Back
Top