Sharepoint 2007 Word文档以只读方式打开

时间:2013-05-14 10:22:38

标签: ms-word sharepoint-2007

我在文档库中有一个word文档,当我从Web部件打开时,它打开为“只读”,并且只允许我用另一个文件名保存文档。

如果我直接从文档库中打开它,则可以编辑该文件,但是我已经设置了一个wiki页面,并希望能够在从Web部件打开文档后对其进行编辑。

我可以直接从网页部件超链接打开文档来编辑文档吗?

1 个答案:

答案 0 :(得分:0)

如果您可以更改WebPart。您可以将链接替换为文件名,并使它们指向此javascript函数:

function editDocumentInProg(strDocument)
{
  var editDocument= new ActiveXObject("SharePoint.OpenDocuments.1");
  if (editDocument) 
  {
    var newDoc = editDocument.EditDocument(strDocument);    
    if (!newDoc)
        window.location.href = strDocument;
  }
}

参数strDocument必须是您想要的文件名。

可在此处找到更多信息: http://msdn.microsoft.com/en-us/library/dd588661(v=office.11).aspx

相关问题