var sURL = document.location.href; var WshShell = new ActiveXObject("wscript.shell"); WshShell.run("rundll32.exe c:\windows\system32\mshtml.dll, PrintHTML " + sURL);
function printPartOfPage(elementId) { var printContent = document.getElementById(elementId); var windowUrl = 'about:blank'; var uniqueName = new Date(); var windowName = 'Print' + uniqueName.getTime(); var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=0,height=0'); printWindow.document.write(printContent.innerHTML); //var sURL = document.location.href; //var WshShell = new ActiveXObject("wscript.shell"); //WshShell.run("rundll32.exe c:\windows\system32\mshtml.dll, PrintHTML " + windowUrl); printWindow.document.close(); printWindow.focus(); printWindow.print(); printWindow.close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)