I want to load word document in different instance using Process.Start()
method.
This is my code.
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = @"D:\MyWordFile.doc";
info.Arguments = "/n"; //I have tried like this but it doesn't work
Process p = new Process();
p.StartInfo = info;
p.Start();
ok, I am trying to hold the process until document don't get exited using p.WaitForExit()
method. It works fine when there is no word application is loaded. if the Word is already loaded in the Task Manager then it throws an error No process is associated with this object.
I think it is because it is just loading document in existing process. So, I think I can resolve this issue by loading my word document in new Word Instance.
I have also read the support document and found some parameters that allows me to load word file in new instance. I have tried /n
in the ProcessStartInfo.Argument
property but, it doesn't work. I think i am doing mistake in assigning arguments in the process or assigned invalid argument. I don't know what is the issue here.
Any help will be appreciated
Thanks & Regard.