I tried to open a word document using System.Diagnostics. It works fine when the docuement name doesn't have any blank spaces in it. But word doesn't open the document when the document name has blanks in it.
My code snippet:
Process process = new Process(); process.StartInfo.FileName = "winword";process.StartInfo.Arguments = @"C:\\Karthick files\\Test.doc";process.Start();
It says winword cannot find the file, but the file actually exist. When I tried to remove the blank space in the folder, it opened correctly.
I tried to open using Process.Start static method and it worked fine, but I need to create the instance of the process because I'm maintaining the processes which are opened this way.
Please anyone of you help me out?
Thanks in advance,
View Complete Post