Fill out an Infopath form from a link on another page

I develop and manage an internal portal based on Sharepoint for our team. One of the form libraries uses data published via InfoPath Forms. My users requested that they be able to launch the Infopath form without really going to the form library, but rather from a link on another page that they frequented. I found Westin's blog useful to address the issue : Eventually, I used Ian Morrish's solution documented at

From Ian's demo, I used this script in a Content Editor WebPart, and it worked like a charm. Thanks Ian :):

<script src="/_layouts/1033/ows.js"></script>
function WPQ3createNewDocument()
var strTemplate = "
var strSaveLocation = "
var strProgID = "SharePoint.OpenXMLDocuments";
createNewDocumentWithProgID(escapeProperlyCore(strTemplate, true), makeAbsUrl(strSaveLocation), strProgID, true);
<a href="" onclick="WPQ3createNewDocument()">Create new order</

Comments (2)

  1. It seems like I have covered this once before but I can find it in my archivesnotes.&amp;nbsp; So here it…

  2. mikeman says:

    Just wanted to say thanks! It’s been over a year since you posted that solution and people like me are still making good use of it!

    I managed to incorporate it into my site quite well so I’m rather happy. 🙂


Skip to main content