RSS LOGORss   Welcome Guest  Login Register
Welcome to our Blogs
Back Back
Subject


mag
2008/08/26 03:22AM
Edit Word Document in Microsoft Word Link (External)      Number of views: 2040

I have been looking for a while for a way of Editing a MS Word file in a document library link to put it in one of my projects, it seems that it's not a common requirement that people may look for, but, as a reference I have added this post, may be someone will search for it and my find this post.

 

The approach is just so simple, it's a JavaScript function that will use an ActiveX object for SharePoint, which in turn will open the file for you.

<script>
function EditDoc(_urlToDocument)
{
EditDocumentButton = new ActiveXObject("SharePoint.OpenDocuments.2");

if (EditDocumentButton)
{
EditDocumentButton.EditDocument(_urlToDocument);
}
}
</script>

 

 

All what you have is to call this function using a link or a button

<a href="javascript:void();" onclick="EditDoc('http://moss/mydocLib/doc.doc')">Edit in Word</a>

I have found this solution in this link [ http://www.wssdemo.com/Pages/Email-Edit-Link.aspx

 

Best wishes,

Microsoftawy :)