我用过
ProcessStartInfo startInfo = new ProcessStartInfo(filepath);
if (File.Exists(filepath))
{
var i = 0;
foreach (String verb in startInfo.Verbs)
{
// Display the possible verbs.
Console.WriteLine(" {0}. {1}", i.ToString(), verb);
i++;
}
}
要找到所选文件的可用动词,请尝试..
ProcessStartInfo psi = new ProcessStartInfo(filepath);
psi.Verb = "OpenAsReadOnly";
Process wordProcess = System.Diagnostics.Process.Start(psi);
我试图打开的文件(excel)没有以只读方式打开。我做错了什么?