September 5, 2001 - Avoiding Multiple Print Dialogs
September 5, 2001 Avoiding Multiple Print Dialogs Tips: September 2001
Yehuda Shiran, Ph.D.
|
invocations
is initialized to zero in the beginning, and then is returned immediately upon
entry when invocations
are greater than one:
invocations = 0;
function CheckIfPrintRequested() {
invocations++;
if (invocations > 1) return;
switch (dialogArguments.__IE_PrintType) {
case "Prompt":
if (printer.showPrintDialog()) PrintPrep();
break;
case "NoPrompt":
PrintPrep();
break;
case "Preview":
default:
break;
}
}
To learn more about print templates, read Column 89 (Print Templates, Part I) and Column 91 (Print Templates, Part II: TemplatePrinter.) Download Microsoft print template loader.