I have the following code that changes the page orientation. it works in IE6 but not in IE7. it gets as far as %a and does not send the enter or tab keys so that i can hit 'OK'
var shell;
function SetPrintProperties() {
shell = new ActiveXObject("WScript.Shell");
shell.SendKeys("%fu"); // %=alt f= file u= page setup
window.setTimeout("javascript:SetPaperSize();", 1500);
}
function SetPaperSize() {
shell.sendKeys("%a{ENTE开发者_StackOverflowR}");
}
Try to run this
shell.SendKeys("%~");
From here
精彩评论