Open files in associated editors.

P

Prashwee

Hi All

I have a simple Application and I need to open my documents files in
assoicated applications given the path name and the file name and the
extension.
For example I got all my files stoted in C:\Documents and under that I got
following files.

mydoc.doc
mypdf.pdf
mytxt.txt
myautocad.dwg
and so on..

If I provide the file path in my program it should open up the file with the
relevent assciated application. for example mydoc.doc should open up with
MSWord and myautocad.dwg should open the autocad 2004 installed in my
computer.
How do i do this in my vb.net 2005 framewrok 2.0

Code example would be extreamly helpfull.

Thanks in Advacne
Prash
 
C

Cor Ligthert [MVP]

Prashwee,

Process start


\\\Word
Dim p As New Process
p.WindowStyle = ProcessWindowStyle.Hidden
p.FileName = "C:\filename.doc"
p.UseShellExecute = True
p.Start
///

I hope this helps,

Cor
 

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

Top