I have a fairly simple SharePoint subsite that has two elements:

  • the home page
  • a document library

The document library has two content types associated with it. What I would like to do is add a link (or button, whatever) to the home page that creates a new document based on the content type.

Essentially, I want to replicate the behavior of:

  1. Navigating to the library
  2. Clicking the Documents tab
  3. Selecting one of the content types from the New Document icon

All from the subsite's home page. Is this possible?

EDIT: I finally got a chance to look at this. Sorry for the huge delay.

So, I created the new form (test.aspx) and inserted the following script and link(s) in the page:

<script type="text/javascript">
function generalInformation() {
     var options = SP.UI.$create_DialogOptions();
     options.title = "New General Information Bulletin";
     options.autoSize = true;
     options.url = "Bulletins/Forms/test.aspx";    
     SP.UI.ModalDialog.showModalDialog(options); }

<a onclick="javascript:generalInformation();">New General Information Bulletin</a>
<a href="Bulletins/Forms/test.aspx">New General Information Bulletin</a></div>

So, I have the two links just for testing purposes. Once invokes the javascript function, and does open a modal dialog. The desired behavior, however, is for Word to launch with a new document based on the template specified by the content type. I'm not sure what I've got wrong, but that is not at all the result I am getting.

Instead, the first link launches a dialog entitled "New General Information Bulletin" that has edit and page tabs, and a save, cancel, paste, cut, and copy buttons in the ribbon. It also has two Save and Cancel buttons. Neither appears to do anything.

What am I missing?

7 Answers 7


Ok. This is what you do.

Fire up Sharepoint Designer and navigate to the list.

On the forms section on the right hand side , click New.

Create a new Form for New Item and select the corresponding Content Type to be used at the bottom.

Save your form and remember the Form name (Example NewDocument.aspx).

Next up, you would normally want your new document, or new item forms to appear in a modal. So, create a link such as: <a onclick="javascript:NewDocument();">New Document type 1</a> with which calls the following javascript:

var options = SP.UI.$create_DialogOptions();
    options.title = "New Document type 1";
    options.autoSize = true;
    options.url = "/Lists/YourListName/NewDocumentType1.aspx";    

Repeat the same process for your other content type.

Hope this makes sense. Let me know if you need help.


  • Thank you -- I do not currently have permissions to use Designer for this particular site, but I think I can get an exception long enough to try this out. Will post back when I am able to test. Commented Dec 19, 2012 at 14:31
  • Ok, I finally got a chance to test. Commented Jan 31, 2013 at 16:39
  • @Fox , it's a Library, not a List. Your code won't work
    – Gintas K
    Commented Mar 29, 2017 at 8:24

Yes, the content type links in the library go to specific URLs. Grab those and then create some simple HTML on your home page and point hyperlinks or buttons to those URLs.

  • Thank you -- I did try to locate the URL but there was no option to "Copy Shortcut" when right-clicking on the content type menu option. I'll poke into the page code a bit more to see what I can find. Commented Dec 19, 2012 at 14:33
  • There's no url on the page. Since the "new document page" gets loaded into a modal dialog, it's being called by javascript.
    – Fox
    Commented Dec 19, 2012 at 14:35
  • That was my suspicion -- and I couldn't see a way to access the javascript from the UI. I'll try your solution, which I'm sure will work. Commented Dec 19, 2012 at 14:40

I did it the following way:

  1. Go to the Library Settings / Advanced Settings and set "Launch forms in dialogs?" to No.
  2. Go back to the library and open the new document forms (for each content type). The "new forms" will now appear as main content and not in a pop up.
  3. While the New Form is open you can copy the URL for each content type`s new form.
  4. Switch back the option to launch forms in dialogs back to Yes (optional).
  5. Create links or buttons on your homepage with the copied links for each content type (these linked forms will not be launched in dialogs)
  • Thanks for your reply. I'm afraid, though, that you've lost me at step 2. There are no forms associated with these content types, and so they have no URL. When I click Documents > New Document, I just get a Word document based on the template. There is no intermediate window that appears from which I could grab a URL. Commented Jan 7, 2013 at 14:21

Man I know this is an old post but I think I have a solution that might be a little easier. My scenario was this.

We had a document library with multiple custom content types. We wanted to place a link to the various new content types on the quick launch that would open the client application like Word or Excel

So I went to the "New Item" button and chose a content type, in this case a MS Word Doc. When it opened I went to the advanced properties of the document and low and behold, there was the URL to the content type!

Went to quick launch, created a link and BAM. user clicks on the content type and a new Word document opens.

Hope this helps someone.


This answer is for the regular user. I can't use SharePoint Designer or extensive javascript and I only have typical user permissions to edit my own pages. I needed to open a new User Agreement document in MS Word, have the user fill out the form fields, sign it digitally, and save it with a useful file name. So I needed a single click button on the SharePoint page that opened a new user agreement, asked who you were, department, your personal device MAC address, digital signature, etc. When completed, it was saved into a protected library with your name as the file name. A tech then viewed the library list periodically and added your device to a network user group. First I created a Word document with FILLIN fields and prominent instructions in a non-printing Font Style. This is the kind that actually prompts you to enter information with a question/answer dialog box.

The fillin field that contains the user name is bookmarked so you can insert a REF field anywhere else you want to see the user's name and they only have to enter it once. You can assign the user name field value to be the document title with a styleref field { SET {TITLE { STYLEREF Title }}} The default file save name is the document title. Save the document as template.dotx to replace the blank template.dotx in the forms folder in the library.

Add a "Content Editor" web part to your page. Save the page, then Edit Page again, click in the new web part and you will see a HTML dropdown in the ribbon. Select Edit HTML Source and enter this code:

<button onclick="createNewDocumentWithProgID
 &#39;SharePoint.OpenDocuments&#39;, false)"
 onfocus="OnLink(this)" type="submit"
template.dotx" style="background-color: lawngreen">
Create New User Agreement Document</button>

This draws a green button with text inside the web part.

  1. Add the document content type/s to a library.
  2. Add the library to a web page as a web part and set its toolbar to display.
  3. View the page’s source code and copy the code for the new button/template.
  4. Enter the code into a CEWP for a link to the content type.

NOTE: For a library with multiple document content types, enable only one at a time and grab the code for each separately.

For step-by-step instructions view my post on creating links to document content type templates here


I know it may be late to answer this question, but I had a similar need and I was able to expand on Fox's idea and write a working SharePoint Pop Up for uploading files.

Here are the steps:

  1. Create your Link in HTML Page and then give it an id; <a href="#" id="Manuals_LinkId">Add Document</a>.
  2. Pass the the link's Id and ListName(or LibraryName) into spModal() function in a gist I wrote. Follow the link for code reference.

Here is a working sample for reference

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.