Home > Web > Launch an InfoPath form

Launch an InfoPath form

Below there is a simple JavaScript function that you can use to launch an InfoPath form from a web page.

function LaunchInfoPath(templateURL, saveLocation) {
    //savelocation sample: "http://server/site/document library/" or "file://c:"
    //templateURL sample: "http://server/site/form library/forms/template.xsn"
    //The function teturns true if it worked, false if it didn't

    var infopath = new ActiveXObject("SharePoint.OpenXMLDocuments.1");
    var result= infopath.CreateNewDocument2(window, templateURL, saveLocation);
    return result;

Categories: Web Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: