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
Allen Browne - 30 Jan 2005 04:22 GMT
Try FollowHyperlink, e.g.:
Application.FollowHyperlink "C:\MyFile.jpg"

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> I have a form and I want to store the path to the file along with the file
> name.
[quoted text clipped - 7 lines]
> 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.