open a file using path in repective application

i have the path to a file. i want to open it in the respective application, example if the path is for a .doc file on button click this file should be open in MS Word or if it is an excel file it should b open in MS excel.

Provided: i m using visual studio.net 2003 vb.net , windows application not a web application.



Answer this question

open a file using path in repective application

  • eagarwal

    Use the Process.Start() method, the shell will automatically launch the application that was registered for the file extension. For example:

    System.Diagnostics.Process.Start(@"c:\temp\test.doc");


  • open a file using path in repective application