function PrintFile()
{
var strResult=window.confirm("确认用Word打印吗?");
if(strResult)
{
App.focus();
document.execCommand("SelectAll");
document.execCommand("Copy");
App.focus();
var WordApp=new ActiveXObject("Word.Application");
WordApp.Application.Visible=true;
var Doc=WordApp.Documents.Add();
Doc.Activate();
Doc.Content.Paste();
Doc.PrintPreview();
WordApp.DisplayAlerts=false;
Doc.Close();
WordApp.DisplayAlerts=true;
WordApp.Quit();
}
else
{
var hwnd=window.open("");
hwnd.document.write(App.innerHTML);
}
return false;
}