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.
 

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