Currently, I have my 'Add new document' (as shown in Illustration A) that keep on giving the following 'Upload document' page (as shown in Illustration B). My intention is to show a new InfoPath form for the user to fill in.

How do I go about it such that when a user click on the 'Add new document' inside my library web part, it will display a new InfoPath form for the user to fill it?

(FYI: Using SharePoint 2007 Document Library)

Illustration A

enter image description here

Illustration B

enter image description here

2 Answers 2


Step 1

Add a Content Editor web part and put the following HTML code in there.

<IMG alt="" src="/_layouts/images/rect.gif">&nbsp;<A onclick="createNewDocumentWithRedirect('http:\u002f\u002fwww.yoursite.com\u002fsce\u002fSubSiteName\u002fListName\u002fForms\u002ftemplate.xsn', 'http:\u002f\u002fwww.yoursite.com\u002fsce\u002fSubSiteName\u002fListName', 'SharePoint.OpenXmlDocuments.2', true, 'http://www.yoursite.com/SubSiteName/_layouts/FormServer.aspx?XsnLocation=http://www.yoursite.com/SubSiteName/ListName/Forms/template.xsn', 0);return false;" href="#">New ListName Document</A>

Remember to replace the following

  • www.yoursite.com to the name of your site
  • SubSiteName to the name of the sub site inside your site.
  • ListName to the name of the list that you are performing on.

Step 2

Remove the title of the Content Editor web part and place the web part below the ListView Web Part (The web part that will link to the upload page instead of the new form page)

Step 3

Inside your ListView Web Part, turn off the toolbar the option.

Now, click on the new link and test.

Let me know if you still have trouble. Also, look in this site for reference.


You need to change the default NewForm of the list to your "new InfoPath form" so that the new InfoPath form is opened by default when users ick on "Add new document". Instructions here.

If I misunderstood what you meant by "new InfoPath form", let me know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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