Opening an existing file on my PC

  • Thread starter Thread starter LB
  • Start date Start date
L

LB

I have one form that has two buttons. I want the first button to exit the
form, and the second button to open a specific file on my C: drive.

I can get the form to close (Woo!), but can anybody tell me the code needed
to open an existing file on my computer. I've spent all morning looking on
the net but have had no luck.

The file, if it makes any difference, is a .pps

Thanks in advance people.

Luke
 
Hi Luke,

Can you try this one

\\\
Dim p As New System.Diagnostics.ProcessStartInfo()
p.FileName = "C:\filename.pps"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)
///

Cor
 
Try using the System.IO.StreamReader class
dim sr as System.IO.Streamreader
sr = new System.IO.StreamReader("theFileName.pps")

assuming you want to read the file
 
Back
Top