One of my coworkers wrote a .NET windows service that converts .doc to .docx files. In order to accomplish that goal, he uses wordconv.exe which comes with the office 2007 compatibility pack.
Most times everything works fine, but under certain circumstances wich we weren't able to reproduce yet, wordconv.exe doesn't convert, but returns exitcode -14.
Unfortunately, this error only occurs in our customers production environment. We weren't able to reproduce the error in the development or integration system.
We're using the following code:
Process converter = new Process();
converter.StartInfo.FileName = <Path to wordconv.exe>;
converter.StartInfo.Arguments = string.Format("-oice -nme \"{0}\" \"{1}\"", fileIn, fileOut);
converter.StartInfo.CreateNoWindow = true;
converter.StartInfo.WindowStyle = ProcessWindowStyle.hidden
converter.StartInfo.UseShellExecute = false;
converter.StartInfo.RedirectStandardError = true;
converter.StartInfo.RedirectStandardOutput = true;
converter.Start();
converter.WaitForExit(intervall);
int exitCode = converter.ExitCode;