baozi

function areaword(value) {
    var wd = new ActiveXObject("Word.Application");
    var doc = wd.Documents.Add("", 0, 1);
    var range = doc.Range(0, 1);
    var sel = document.body.createTextRange();
    sel.moveToElementText(value);
    sel.select();
    sel.execCommand("Copy");
    range.Paste();
    wd.Application.Visible = true;
    return false;
}

注意Automation 服务器不能创建对象,需要打开Internet选项,自定义安全里面的所有ActiveX选项

分类:

技术点:

相关文章:

  • 2022-02-14
  • 2021-12-09
  • 2021-10-08
  • 2021-12-05
  • 2021-12-05
  • 2022-01-02
  • 2021-12-09
  • 2021-11-18
猜你喜欢
  • 2021-12-09
  • 2022-02-26
  • 2021-12-30
  • 2022-12-23
  • 2021-12-16
  • 2022-01-07
相关资源
相似解决方案