C#如何调用Word并打开一个Word文档
2023-07-06
private void OpenMicrosoftWord(string urlorpath)
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = “WINWORD.EXE”;
startInfo.Arguments = urlorpath;
try
Process.Start(startInfo);
catch (Exception e)
MessageBox.Show(“Cannot start Microsoft Word, please make sure it is installed.”);