Collaboration

SharePoint Server 2007 content types enable enhanced document management

This information is also available as a PDF download.

Many SharePoint users already know that you can create a new Word document from within a document library. However, Microsoft Office SharePoint Server (MOSS) 2007 takes this one step further by letting you create any type of document you want within the same document library. You could do this in previous versions, but it was difficult to implement and was not an out-of-the-box solution — and it generally resulted in a separate document library for each document type. With MOSS 2007, this feature is now part of the application and is reasonably easy to implement at both the site and document library level.

Suppose your organization has specific metadata it associates with certain types of documents (contracts, applications, etc.). A content type could be used to request that the user add the metadata when creating or saving a document. Content types can have one or more columns associated with them, just like a standard MOSS list. Columns equate to the different metadata you want to associate with the particular document. For example, a contract document could be created with the following content type and metadata columns:

Content type name: Contract document
Columns: Contract Reference
         Contract Title
         Company Reference
         Subject

Each column would provide a single metadata value associated with the document. As usual with MOSS, you can create your own columns or use existing site columns.

When a user opens the document in Word 2007, he or she can add the metadata before saving the document back to SharePoint. Why would you do this? One of the advantages of using content types and metadata in general is that you can use this information to assist users when they're searching for data. Instead of general searching for documents and information, greater finesse can be achieved using metadata as the basis for search.

Creating content types

Content types can be created at the site collection level and then used in any child site or can be created for use in specific document libraries. To demonstrate, we'll configure a document library to use content types and create a simple type and associate it with a Microsoft Word 2007 template. In this first example, we'll create a site-level content type. Then, we'll configure a document library to use the content type and its associated Word 2007 template. It's worth noting that the process for site-level content types is the same as for content types created for use in specific document libraries. The main change can be seen when saving the document back into MOSS.

To follow this example, you will need to open the site settings administration page for a MOSS site. Under the Galleries category:

  1. Click Site Content Types. Note that many default content types are already available to you. These default content types are created when the site is provisioned (created). Also note how the content types are sorted into categories, such as Document Content Types, which creates a new document library.
  2. Click Create (located at the top-left of the page).
  3. On the New Site Content Type page, enter My Document as Name.
  4. Enter Demo of Content Types as Description.
  5. Select Document Content Types from the Select Parent Content Type From drop-down list.
  6. Select Document from the Parent Content Type drop-down list.
  7. You can add your new content type to an existing group or create a customized group within the site. In this case, enter My Group as the name for a custom group, as shown in Figure A.
  8. Click OK to create the new content type.

Figure A

The configuration page for the new content types will open, displaying information about the object you have created. Note that two columns are already available, Title and Name, which have been inherited from the document parent content type. You can add more columns by selecting Add From Existing Site Columns or Add From New Site Column. Columns being added to the content type can also be made required if you need to ensure that the user enters metadata.

Configuring a document library

Before content types can be used within a document library, the library must be enabled. By default, a document library will not support multiple content types. To enable the library, follow these steps:

  1. Open the Document Library Settings page.
  2. Click General Settings.
  3. Click Advanced Settings.
  4. Set Allow Management Of Content Types to Yes.

Now, the document library will support multiple content types. To continue with the process and add the content type in the document library, follow these steps:

  1. Select Settings.
  2. Select Document Library Settings.
  3. Select Add From Existing Site Content Types.
  4. Select your custom group from the Select Content Types From drop-down list.
  5. Click on your new content type.
  6. Click Add.
  7. Click OK.

Return to your document library and click on the New menu. Figure B shows the menu with the content type added. Figure B

Now you may want to associate the content type with a template, such as a contact template. To do this, return to the Document Library Settings page. In the Content Types section, click on the content type name to open the List Content Type screen. Then, complete the following steps:

  1. Click Advanced Settings.
  2. Select the Upload A New Document Template option and upload the required document template to the server.
  3. Click OK to save the new settings.
  4. Return to the document library.

Selecting New will now open a new document based on the content type and its associated template.

That's it; you're done. You just created a new MOSS content type and associated it with a standard Word template. With a few MOSS clicks, you can support different document types with their associated metadata in your MOSS document library.


Martin W.P. Reid is an analyst at Queen's University Belfast. He co-authored Beginning Access 2002 VBA, published by Wrox, and SQL Access to SQL Server, published by Apress. His most recent book, Pro Access 2007, also published by Apress, is now available.Martin has also been widely published on the Internet, writing articles for Builder.com, DevX, and MSDN, as well as for TechRepublic. He is currently working on a large scale MOSS 2007 implementation at the University and is mainly interested in using MOSS collaboration/Office 2007 to improve business processes and information exchange.

Editor's Picks