One of my colleagues wrote a Windows.NET service that converts .doc files to .docx. To achieve this, it uses wordconv.exe, which comes with the 2007 Office Compatibility Pack.
In most cases, everything works fine, but under certain circumstances that we have not yet been able to reproduce, wordconv.exe does not convert, but returns exitcode -14.
Unfortunately, this error only occurs in the production environment of our customers. We could not reproduce the error in the development or integration system.
We use 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;
source share