Friday, June 6, 2008

Content types in Microsoft Office SharePoint Server 2007 and MS Office 2003

Let’s talk about custom content type in Microsoft Office SharePoint Server 2007 and how it works with MS office 2003. To help visualizing this, I have taken screen captures for every little step.

1. Create a custom content type for your test site. I am going to use “SCTest” top level site (site collection) for the demo. Go to Site Actions => Site Settings and click on “Site Content Types” link under Galleries category.

2. Click “Create” link on the top left corner of Site Content Type Gallery.

3. Create a new site content type as shown below. I have chosen Document content type for simplicity. You can add this content type to “Custom Content Types” by selecting it for Group category but I have created a new group called “Test Group” to add this new content type. Please note that I have named new custom content type as “Project Release Documents”

4. You will see following screen on adding a new custom content type. Click “Add from existing site columns” link under “Columns” category.

5. Add appropriate columns for this new content type. I have chosen few as shown below.

6. This is how a new custom content type looks like after adding few existing site columns.

7. I am creating a new document library for “Test Site Collection” (SCTest) to use this custom content type.

8. As usual, I have used shortest possible name for my document library to keep URL for this document library as short as possible. You can always change the “Name” field later on by going to Title, description and navigation under General Settings of document library settings.

9. Go to Settings => Document Library Settings.

10. This is an additional step. I have modified the document library name from TCTL (to keep URL short) to Test Content Type Library as by going to Title, description and navigation under General Settings

11. Click “Advanced Settings” link under General Settings category.

12. Select “Yes” for “Allow management of content types?” and click “OK”.

13. Select “Add from existing site content types” link under Content Types.

14. Select a new custom content type – “Project Release Documents” which you have created in previous steps as shown below.

15. This is an additional step – I am changing order for content types and making “Project Release Documents” as default content type. Select “Change new button order and default content type” link under Content Types.

16. Change the order and select number “1” for “Project Release Document” content type to make it default content type for this document library.

17. So finally content types and columns for your document library will look something like this. Please adjust your column order by clicking on default view – “All Documents”.

18. Now, something very interesting…how content types work with MS Office 2003. Well, keep reading…

As you can see from the screen capture, “Project Release Documents” is the default content type for your document library. Click New menu and select “Project Release Documents” to add a new document (content) to your document library.

19. You will see following message on your screen, if you have MS Office 2003 installed on your machine. Click “OK”

20. It will allow you to use MS Office 2003 (Word 2003) to create a new document. As you have already noticed MS Office 2003 will not allow you add/edit metadata in Word application itself. Add some text to this document and click “Save” icon.

21. Now, you can add those metadata properties for your document however I have noticed that couple of document properties is still missing…I don’t know why. I need to check it out later but anyways it will allow you to add metadata properties for your document using MS Office 2003 and that is what is more important.

22. To add those missing metadata properties, I am going to right click on document in my document library and select “Edit Properties” link.

23. Adding those missing metadata properties, which I could not see in MS Office 2003 for some reasons.

24. Finally here is the document in document library which was created using custom content type and MS Office 2003.


Now, here is the scenario for those unlucky people who can not work with content types using MS Office 2003.

Note: This site belongs to different SharePoint test environment than the previous one.

1. I have created ProjDocs document library and it has “Test Content Type” as default content type.

2. Attempt to create a new document in ProjDocs document library. Same message will pop up, which is shown is previous screen capture before opening MS Office 2003 (Word 2003) for creating a new document.

3. Unfortunately when you try to save this document, it will give you following error message. When you (keep) clicking on either “Yes” or “No” button, it will finally add this new document to ProjDocs but all metadata properties will be missing and you can not add metadata properties even by editing properties in SharePoint.

4. Document “Test2” was added.

5. Trying to edit metadata properties by right clicking “Test2” document in ProjDocs document library and selecting “Edit Properties” link.

6. Unfortunately it does NOT allow adding those missing metadata properties.

7. Here is the work around. If you want to create a new document, simply upload a new document and it will allow you to add those metadata properties but if you want to edit metadata properties of existing document unfortunately you have to download that document to your local computer first and then upload it back to edit/update its metadata properties. Here is the screen capture for uploading a new document to ProjDocs document library.

8. Enter metadata properties for this document and you are done!

9. Here is how ProjDocs document library looks like after uploading those two documents.

Note: Error: 'length' is null or not an object is environment specific. It happened in our environment after we installed one of the hot fixes (http://support.microsoft.com/kb/935958) for resolving the other issue.

Here is the hot fix for those who are unable to work with content types using MS Office 2003.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;950292

This hot fix also resolves issues to work with multiple content types using MS Office 2003.

Note: I have taken screen captures from two separate SharePoint environments.

Step 1-24 are from the enviornment, that does NOT have http://support.microsoft.com/kb/935958 hot fix applied and we can work with content types using MS Office 2003 without any issues.

Step 1-9 are from the environment, that has http://support.microsoft.com/kb/935958 hot fix applied and for some reasons we are unable to work with content types using MS Office 2003 after applying that hot fix. We have to apply http://support.microsoft.com/default.aspx?scid=kb;EN-US;950292 hot fix to resolve errors explained in these steps but we will have MS Office 2007 available very soon so we have NOT applied it yet.

No comments: