open an InfoPath directly in browser via a link

On a recent project I had to open an InfoPath form via a link I made on a calculated field.
Making the link is not that hard, but it would only give me the choice to open or save the file..it would not make the infopath open itself in the browser.

The solution is to add “?openin=browser” to your link.

The calculated column will look like this then:

=”< a href= http://server/site/documentlibrary/” & Title & “?openin=browser>” & Name & “< /a >”

– thanks to Patrick Sledz

About: Marijn

Marijn Somers (MVP) has over 14 years experience in the SharePoint world, starting out with SP2007. Over the years the focus has grown to Office 365, with a focus on collaboration and document management. He is a business consultant at Balestra and Principal Content Provider for "Mijn 365 Coach" that offers dutch employee video training. His main work tracks are around user adoption, training and coaching and governance. He is also not afraid to dig deeper in the technicalities with PowerShell, adaptive cards or custom formatting in lists and libraries. You can listen to him on the biweekly "Office 365 Distilled" podcast.


4 thoughts on “open an InfoPath directly in browser via a link”

  1. Hi Marijn,

    This may be unrelated to this post but I was wondering if you had a code snippet that I can use to open an Excel file via a link on SharePoint to open in the Excel application. The catch is that I have to use a calculated field because I am using the Created value as the pointer

    Method 1
    Opening the file via a calculated field using div tags and then converting it to html using JavaScript however the SharePoint calculated field does not except it (used OpenDocuments)

    Method 2
    Add the a href in JavaScript and use a replace function to insert the a href, however with all the quotes in OpenDocuments, I don't think my code is correct

    I am using SP2007 if that helps.

  2. So I figured out the above and was able to create a caclualted field to open an Excel file in Excel and not into the browser.

    Now the issue seems to be that I cannot pass the parameter from SharePoint to Excel.

    my hyperlink is excelfile.xls?key=12345 and when it goes to the browser I can get the value of key into the spreadsheet, however it doesn't seem to work when opening in the application itself.

    Have you come across something like this that could help?

  3. no idea if that is even possible. You can always ask around in the MSDN forum, a lot of great people there who are willing to help.

    I don't have an answer on your question right now.

Leave a Reply

Your email address will not be published. Required fields are marked *