Opening a .MSG file using Process.Start()

Feb 16 2015 9:44 PM
ProcessStartInfo startInfo = new ProcessStartInfo(); Process first = new Process(); startInfo.FileName = "OUTLOOK"; startInfo.Arguments = "http:\\blabla.com\EMAIL.msg"; startInfo.CreateNoWindow = true; first.StartInfo = startInfo; first.Start();i used Process.Start to start up Outlook and open a .Msg file. how can i reuse the same process to open another .msg file without opening multiple windows of outlook?
i have tried something like
Process[] outlook = Process.GetProcessesByName("OUTLOOK"); Process existing = outlook[0]; startInfo.FileName = "outlook"; startInfo.Arguments = "http:\\blabla.com\2ndEMAIL.msg"; startInfo.CreateNoWindow = true; existing.StartInfo = startInfo; existing.Start(); to reuse the same process but i'm still opening multiple windows of outlook instead of just the .MSG file

Answers (2)