Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / January 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
acs68 - 30 Jan 2005 03:52 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.