On Fri, 29 Aug 2008 09:43:02 -0700, Ryan <Ry**@discussions.microsoft.com>
wrote:
I pass a filename to a method which needs to open that file up with the
aPPlication associated with that filename. If the file MyFile.txt then
the
method should open it up in Notepad,. If MyFile.doc is passed then it
should
be open up in MS Word.
Use the Process class, passing the document name as the
ProcessStartInfo.FileName used. As long as you don't change the default
value of ProcessStartInfo.UseShellExecute from "true", the Process class
will use the Windows Explorer shell's file type associations to launch the
appropriate program.
Pete