executing an outside file like .doc or even .exe

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
What's the command to execute another file with its appropriate player? Like if I have a
filename in a string, and it ends with .doc, Word would load . Or just execute an exe if thats
the extension.
Thank you!
 
It works just like the start command in your command interpreter.

The method is

System.Diagnostics.Processes.Start("mydoc.doc")

that will fire open whatever program the extenion .doc is associated with.
 
Back
Top