Opening a file... any file (cross-posted microsoft.public.dotnet.languages.vb;microsoft.public.dotn

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hello

I am trying to set up an open file routine that will open whatever files
name is passed with its correct associated application. I have done this
(quite easilly) before in VBA and am able to open pretty much anything I
want using shell execute etc.

I tried importing the old code into VB dotNet and it executes fine but just
doesn't actually open the file. No errors returned at all (?).

I also tried using an openFileDialog and can get the filename etc. but can't
figure out how to actually open the file :@(

Anyone got any sample code or suggestions? This is hurting my head big time.
Should be so simple...

TIA

Mark
 
Sorry folks... Found it on Google minutes after my last post.

Used

System.Diagnostics.Process.Start("filePath.etc")

and it works just fine :@)
 
Mark,

I thought I would find this thousand times and could copy it, however this
is copied from a German entwickler newsgroup.

\\\
using System.Diagnostics;
..
..
Process.Start(@"C:\foo\bar.doc­");
///

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

Back
Top