function openWord(filename){
 try  {
    var wrd=new ActiveXObject("word.Application");
    wrd.visible=true;
    wrd.Documents.Open(filename);
    wrd.Application.Printout();
    wrd=null;   
 }
 catch(e){}  
}
调用此函数打印word文档<input name="Submit2" type="button" class="btn_grey" onClick=openWord('E:\\r.doc')
打开并打印了word文档,请问如何实现让此文档打印完成后自动关闭。谢谢!