Process.start class(again)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I try to use Process.start for opening a file in word(2003), I get a message stating that word cannot find the file. I can open word manually and open the file but not from VB.Net. I have the Word library reference too. What am I doing wrong?
 
Jim,

Can you post the code you are using to try and open the document with and we
can see if anything looks amiss.

Gary

Jim said:
When I try to use Process.start for opening a file in word(2003), I get a
message stating that word cannot find the file. I can open word manually and
open the file but not from VB.Net. I have the Word library reference too.
What am I doing wrong?
 
* =?Utf-8?B?Smlt?= said:
When I try to use Process.start for opening a file in word(2003), I
get a message stating that word cannot find the file. I can open word
manually and open the file but not from VB.Net. I have the Word library
reference too. What am I doing wrong?

"Post code!"
 
Here is what I am using

System.Diagnostics.Process.Start("excel.exe",("C:\mytestapps\mytestsheet.xls")
 
* =?Utf-8?B?Smlt?= said:
Here is what I am using:

System.Diagnostics.Process.Start("excel.exe",("C:\mytestapps\mytestsheet.xls"))

Why not use something like this?

\\\
Imports System.Diagnostics

..
..
..
Dim psi As New ProcessStartInfo()
psi.UseShellExecute = True
psi.FileName = "C:\bla.xls"
Process.Start(psi)
..
..
..
///
 
Back
Top