Launching the default app for a file - how do i do it ?

  • Thread starter Thread starter acs68
  • Start date Start date
A

acs68

Hi all,

newbie with this.

I have a form and I want to store the path to the file along with the file
name.

I then want to have a button that takes the file/path and launches the
default application for that file type. I.e. if it is a jpg - it launches my
default image viewer, if it's a .doc file it launches Word.

Can someone tell me what the code is to do this ?

I've heard before talk about the Shell command, but in this instance the
file type could be anything so I cannot launch an application as such.

any ideas ?

cheers
 
Try FollowHyperlink, e.g.:
Application.FollowHyperlink "C:\MyFile.jpg"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top