This is a quick blog post on document library behavior for SharePoint 2010. By default, when you create a new document library you are asked which document type you want to make “Default” for your list. However, what if you want all four Office document types to show up? Here’s what we’re going to walk through; getting from this:
Let’s begin! First thing we’re going to do is to create the document types for Excel, PowerPoint, and OneNote. (I don’t create a word content type since I’m going to use that as my default type, but you can do this if needed using the same method).
Let’s first go create our “default template files” for Excel and PowerPoint–you need to have the Office applications installed to do this. Open up each application, and save the “blank” document you get when opening the application to your desktop. For example, Open Excel, click “Save As” and save it to your desktop as “excel_template.xlsx”. Repeat for PowerPoint.
OneNote is harder since you need to get a “*.onepkg” file. The easiest way to do this is to create a temporary document library that has OneNote as it’s default. Here’s the steps to extract the default OneNote:
- On your SharePoint Site, click New Document Library under the Site Actions menu (normally in the upper left corner)
- Provide some temporary data. Make sure you select “Microsoft OneNote 2010” as your default template:
- When the list gets created, on the Library ribbon tab click the Library Settings link.
- On the settings page, under General Settings click the Advanced Settings link.
- The second option on this page is “document template”. Highlight the template URL value and Copy it.
- In your address bar, remove everything after your “site url” and paste in the document template path from the previous step. Essentially everything from “_Layouts/advsetng.aspx?List=” onward.
- Press enter. When you’re prompted, press “Save” and save it to your desktop as “onenote_template.onepkg”. This is your OneNote template.
- To delete this temporary list you can find a Delete this List option on the Library settings page—you can reach this from step g by simply pressing your browsers back button or “Cancel”
Now that we have our templates, we need to create our content types. We do the same thing 3 times—once for each document type:
- Let’s create the excel type. First we navigate to Site Settings from the Site Actions menu
- Under the Galleries section, click the Site Content Types link.
- On the content types page, click Create.
- Fill in the form by: Providing the Name & Description you want users to see in the New Document dropdown (leave description blank to have it say “Create a new <Name>”. For the rest of the items, fill it in as you see below (Important:make sure you set the parent content type to “document”):
- After created, you’re taken to the Content Type management page. Under Settings, click the Advanced settings link.
- In the first row, select “Upload a new document template:” radio button, and browse to the Excel “template” you created in step 1 above.
- Press “Ok” to save your changes.
- Repeat this entire set of steps to create a content type for PowerPoint and OneNote Notebooks.
Last step—setup the Document Library.
- First, on your SharePoint Site click New Document Library under the Site Actions menu.
- Provide the name and description. Since we created content types for Excel, PowerPoint, and OneNote I’m going to pick “Microsoft Word document” as my default template.
- We need to first enable custom content types for this list. In your new document library, click on theLibrary ribbon tab and click the Library Settings button (almost all the way to the right).
- On the Library Settings page, click the Advanced Settings link.
- The first option is “Content Types”. Set “Allow management of content types” to Yes and then press OK
- A new section will have appeared under the menu on the Library Settings page called Content Types. Click the link at the bottom of this section called Add from existing site content types.
- Add the three custom content types we created in step 3 by selecting them one at a time and pressing the Add > button. I filter down the list to “Document Content Types” to make them easier to find. When you get something like I have below, press OK
- Now on the Library Settings page click the Change new button order and default content typelink.
- On this page you can order the New Document menu options to your liking. When you’re done, click OK
- We’re done! Note that these content types now exist anywhere in this site so you can just do step 4 above to add these same options to another library.