0
votes

I have a word document in a document library that when I open from a web part opens as 'Read Only' and will only let me save the document with another file name.

If I open it directly from the document library the file can be edited however I've setup a wiki page and want to be able to edit the document once it is opened from the web part.

Can I edit the document straight from opening it in from the web part hyperlink?

1

1 Answers

0
votes

If you can change the WebPart. You could replace the links to the file name and make them point to this javascript function:

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

The Parameter strDocument would have to be your desired filename.

A little more information can be found here: http://msdn.microsoft.com/en-us/library/dd588661(v=office.11).aspx