Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I set up a document library for a team's weekly status reports, which are standard Word 2007 documents. Instead of emailing the reports to managers in other departments, the team uploads the reports to the library, and then sends the URLs for each report as a link in the body of an email message to each manager. (Everyone has been given "Read" access to this library.)

We're finding that about 2/3 of the links sent this way are failing to open the document; here's what happens when someone clicks on those links in the email body:
- Internet Explorer opens briefly, with the URL in the address bar.
- The message "Connecting" appears briefly; there may be a progress bar, depending on the individual user's configuration.
- The IE window closes.
- The document never appears (Word fails to launch).

Our email client is Groupwise 8.0.2; IE version 7.0.5730.13; Sharepoint 2007.

Any ideas on what's prventing these documents from opening?

share|improve this question
add comment

2 Answers

I would recommend creating a custom page (can be layout page, web part page with some JavaScript, etc.) that is the target of the email link.

The page should accept a URL parameter which has the value of the URL of the target document.

This method is required to ensure that the document opens in Word with the correct "connection" to the SharePoint environment (i.e. when you click "Save", it saves back to SharePoint).

The script is pretty basic:

<script type="text/javascript" src="/_layouts/1033/core.js"></script>
<script type="text/javascript">
// Find the redirect target in the URL query string.
var qs = window.location.search.substring(1);

var qt = qs.split("&");

var found = false;

for (var i=0;i<qt.length;i++) 
{
    qi = qt[i].split("=");

if (qi[0] != "rd") 
    {
        continue;
    }   

    var url = qi[1];

    redirect(url);

    found = true;
}

if(!found)
{
    // Didn't find the token; show a warning.
    document.getElementById("warning").style.display = "block";
}

// Calls the SharePoint JavaScript API call to open the document for edit
// using the native scripts implemented in init.js and core.js.
function redirect(url) 
{
    var baseUrl = window.location.href.toLowerCase();

    document.getElementById("documentUrl").innerHTML = url;   

    editDocumentWithProgID2(
        url, 
        '', 
        'SharePoint.OpenDocuments', 
        '0', 
        baseUrl, 
        '0');

    window.opener = self;

    window.open('', '_parent', '');

    window.close();       
}
</script>

The magic is really the editDocumentWithProgID2 method.

share|improve this answer
add comment

Under library settings -> Advanced, there should be an option that says "open in client applcation".

Also take a look at the below link http://support.microsoft.com/kb/162059

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.