using (PrintDialog printDialog1 = new PrintDialog())
{
if (printDialog1.ShowDialog() == DialogResult.OK)
{
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(saveAs.ToString());
info.Arguments = "\"" + printDialog1.PrinterSettings.PrinterName + "\"";
info.CreateNoWindow = true;
info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
info.UseShellExecute = true;
info.Verb = "PrintTo";
System.Diagnostics.Process.Start(info);
}
}
The above code works fine. I just don't know how to change the code so that I can preview the Word document first.
PrintPreviewDialog
? – ConnotationPrintPreviewDialog
example code? – PottsPrintDialog printDialog = new PrintDialog(); printDialog.ShowDialog();
– Fulvous