I have a bunch of documents that are either word or excel files generated by a third party program. They are all saved with an XML file extension. When opening the file from File explorer, office xml handler determines which office prg to open them with and does so. I have uploaded all these XML files to a Sharepoint library. When click on the name of the file in the library they open in the appropriate program. I next created a list based on an excel index file that is provided. In this list I created a link to the file in the sharepoint file when there is an appropriate list entry. The problem is when using the link, the xml file is opened up in the web browser and is all the "Raw" formatting of the xml file.

I did some research and found the opposite problem where people were trying to force the links to open in OWA (assuming that is Office Web Application) in the browser instead of downloading the file. The apparent solution to that problem was to add ?web=1 at the end of the link.

I followed this link to a similar Q on stack, and I also followed a subsequent link to deal with exceptions but it was for C# and powershell, and I was not totally following.

SharePoint 2010: Open .webpart file in Web Part Gallery in browser like .xml file

Is there a way to modify the link that will force the file to either be opened via the appropriate office program or conversly downloaded so the file can be opened locally by the appropriate app? Opening would be prefered over downloading, but I am open to both.

This is what I am getting when I follow my current links:

example 1

What I should be getting (MS Word in this case): Example 2

The current link format I am using is:



Found this solution for forms where they modified the link for infopath for a form they were using. I am not understanding all the changing in the accepted answer. Wondering if similar change could be made for word and excel files saved in xml format.

Open instead of prompt for download XML Documents on IE (Link emailed from a SPD WF)


I tried adapting the link to:


But that just threw an error on the sharepoint page. I am assuming this I because it is not a form. I then tried the following:


This resulted in nothing happening. I am assuming that is because the guest key is missing and I don't know what it is. I then tried the following:


Which seems to work in forcing a prompt for open, save/save as and Cancel. When open is clicked, the file is opened in the correct desktop prg. Is there a way to modify the url so that Open is automatically accepted instead?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.