110,529
社区成员
发帖
与我相关
我的任务
分享
string filePath = Application.StartupPath + "\\Helper.doc";
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
proc.StartInfo.FileName = "winword";
proc.StartInfo.Arguments = filePath;
proc.Start();
System.Diagnostics.Process.Start(Application.StartupPath + @"\\ADHelper.docx");
允许有空格
System.Diagnostics.Process.Start("winword.exe", Application.StartupPath + @"\\ADHelper.docx");
不允许有空格
System.Diagnostics.Process.Start("winword.exe", "C://ADHelper.doc");
Application.StartupPath 设置为C盘的绝对路径也是提示找不到的,已测试。
就一句代码,如果你们不嫌麻烦的也可以试一下。