howie

主函数方法

 

function OpenWord(){
Layer1.style.border=0;
word = new ActiveXObject(\'Word.Application\');
word.Application.Visible = true;
var mydoc=word.Documents.Add(\'\',0,1);
myRange =mydoc.Range(0,1);
var sel=Layer1.document.body.createTextRange();
sel.select();
Layer1.document.execCommand(\'Copy\');
sel.moveEnd(\'character\');
myRange.Paste();
location.reload();
//word.ActiveWindow.ActivePane.View.Type=9;
}

页面调用

<div id="Layer1" >
<input type=button name=\'button_export\' title=\'导出到word\' onclick="OpenWord()" value="导出到word"></div>
</div>

分类:

技术点:

相关文章:

  • 2022-01-02
  • 2021-11-12
  • 2021-11-28
  • 2021-10-15
猜你喜欢
  • 2021-12-16
  • 2021-11-27
  • 2022-02-06
  • 2021-12-13
  • 2021-08-27
  • 2022-01-09
  • 2021-12-23
相关资源
相似解决方案