我用JS打开word文档是只读方式不能修改,请问怎么样才能让他可以让我修改,也就是读写方式打开。
我代码大概是这样写的 
var openDocObj = new ActiveXObject("SharePoint.OpenDocuments.1"); 
        openDocObj.EditDocument("http://localhost:7088/xxx/document/aaa.doc"); 打开是只读 非常纠结啊求高手。。

解决方案 »

  1.   

    http://blog.csdn.net/educast/article/details/1938661 搞定
      

  2.   


    <html>
    <head>
    <title>打开word文档</title>
    <meta http-equir="content-type"content="text/html";charset="gb2312">
    <script language="Javascript">
    function doword(doc)                    //doc为你的当前路径下的文件名
    {var url=unescape(window.location.href).replace( "file:///","");
    url =url.substring(0,url.lastIndexOf("/")+1).replace("/","//");
    url=url+doc;
    var WordApp=new ActiveXObject("Word.Application");
    WordApp.Application.Visible=true;
    var Doc=WordApp.Documents.Add(url,true);
    }
    </script>
    </head>
    <body>
    <button onClick="doword('test2.doc')">打开Word文档</button>
    </body>
    </html> 我这个可以打开呢,也可以编辑哈,你试试看呢 。我是放在本地测试的,你把这个html和world文件放在一个文件夹下面测试哈
      

  3.   

    哥们按照你这样写了。。开始还是一样不能写啊 。。保存的时候是另存为,并没有在原来的word上修改,知识另存为了。
      

  4.   

    解决了么 我也在做word编辑这些东西呢。。