• 2022-06-06
    string fileNewPat = Application.StartupPath; string fileName = fileNewPat+@"\doc\程沐喆.doc"; if (File.Exists(fileName)) { Process process1 = new Process(); process1.StartInfo.FileName = fileName; process1.StartInfo.Arguments = ""; process1.StartInfo.WindowStyle = ProcessWindowStyle.Maximized; process1.Start(); } else { MessageBox.Show("文件不存在"); } 这段代码可以使用默认程序打开word文档。