The example below shows how to interface with any of our applications ('Convert Doc', 'Convert XLS' etc.) by using the command line within MS Visual Studio .NET. cmdLine = @”/S “ + filename.doc + “ /F” + fromType + “ /T “ + filename.pdf + “ /C” + toType + “ /L” + @”c:\temp\testsave\result.log”;
Process DOS = null; ProcessStartInfo qOptions = new ProcessStartInfo (programpath, cmdLine);
qOptions.RedirectStandardOutput = true; qOptions.RedirectStandardError = true; qOptions.UseShellexceute = false; qOptions.WindowStyle = ProcessWindowStyle.Hidden;
DOS = Process.Start(qOptions) DOS.WaitForExit();
Result = DOS.StandardOutput.ReadToEnd(); String error = DOS.StandardError.ReadToEnd();
|