Insert “+ Add Document” in a Sharepoint page.

We all know that we have an option to add new document in document libraries. If the customers want the ability to do the same from any other page, we can do that too with the use of ‘Content Editor Web Part’.  Here are the steps.

  1. Edit Page -> Add new content editor web part.
  2. Click here to add new content  -> HTML markup<a class=”ms-addnew” id=”idHomePageNewDocument” href=”http://abc.xyz.org/_layouts/Upload.aspx?List={your list guid}&amp;RootFolder=” onclick=”javascript:NewItem2(event, &quot;https://office.bt.com/sites/PCs/KAL/_layouts/Upload.aspx?List={0DAB416D-AB62-489A-AEAA-798114AD244F}&amp;RootFolder=&quot;);javascript:returnfalse;” target=”_self”>+ Add document</a>
  3. You can get the link of your ‘+ Add Document’ by right clicking properties and copy the path that you can then paste in the href section of the hyperlink above.
  4. Apply -> OK -> Stop editing.
  5. You can further change the title of the web part by editing the content editor web part.
  6. Now we can add new documents to the library from the page you inserted the link in.

Good luck!


Discover more from QubitSage Chronicles

Subscribe to get the latest posts sent to your email.

2 thoughts on “Insert “+ Add Document” in a Sharepoint page.

  1. Hope you will be reading this post!
    Thanks, I followed your steps, which works great on a OOTB Document Library.
    If after uploading a document, I need to fill in few properties (Column values), then this solution works half way..i.e it uploads the document, but doesn’t allow me to fill up the values.

    Please help

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.