How can I launch the print of a document from C# .NET application ? the Word document already exists in the hard drive. I just wish to start printing that Word document upon the
To do this kind of thing you need to know about System.Diagnostics.Process , the MSDN page shows how to pridnt a Word document as an example. A short version:
System.Diagnostics.Process printProcess = new System.Diagnostics.Process();
printProcess.StartInfo.FileName = @"X:\test\print this.doc";
printProcess.StartInfo.Verb = "Print";
printProcess.StartInfo.CreateNoWindow = true;
printProcess.Start();
ProcessStartInfo psi = new ProcessStartInfo(wordFilename)
{
UseShellExecute = true,
Verb = "print",
RedirectStandardOutput = false,
CreateNoWindow = true
};
using (Process p = new Process {StartInfo = psi})
{
p.Start();
p.WaitForExit();
}