Learn more about SQL Server tools

mssqltips logo
 

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

 

How to change the default document template when creating a new document library in MOSS 2007


By:   |   Read Comments   |   Related Tips: > Sharepoint

Next Free Webcast - The more things change… DBAs versus Sysadmins in cloud availability


Problem

A couple of days after my company migrated MS Office from 2003 to 2007, my CTO walked into my office and asked why any new documents created from a newly created document library ended up opening in Compatibility Mode in Word 2007. I duplicated the problem quickly and told him that I would fix it ASAP.

The problem is that the out-of-the-box (OOTB) default document template is a "Microsoft Office Word 97-2003 document" when you create a new document library in MOSS 2007. Most users will not check the option and use the default.

Solution

Before you apply the solution, you should see the default document template and the order of available document templates (see below) when you create a new document library. Notice that the 97-2003 versions are first.

document template dropdown list before changes

Step 1:

Open the site definition file ONET.XML of site template you would like to change. Check in the folder...

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\{site-type}\XML

...on your MOSS server. Note that for team site, the site type is sts. Under the root Projects, you should see the element "DocumentTemplates".

document templates order in onet.xml before changes

Step 2:

Move the three Office 2007 DocumentTemplate elements ahead of the three for Office 97-2003. Or you can re-order the DocumentTemplate elements as you need. Make sure the first DocumentTemplate element with the attribute 'Default' is set to TRUE and that it is the default one you want. If the element does not have a Default attribute, add one and set it to "TRUE". Here is my version:

project title

Step 3:

Reset IIS on your MOSS server. Either run the iisreset command or do this in the Internet Information Services (IIS) Manager.

Step 4:

Be sure you follow Steps 1 - 3 for each site template you would like to change the default document template for on each front-end server in your farm.

After these changes, you should see the document template dropdown list as below. The default one is "Microsoft Office Word document" and Office 2007 templates are on top of 2003 templates as my CTO expected.

new

Summary

Document templates are defined and configured in the site definition file onet.xml for each site template. By changing the order of document templates and the Default attribute, you can specify the default document template and the order of document templates in the template dropdown list when you create a new document library in a site which is based on the modified site definition. This customization helps you and your company to take advantage of many advanced features of MS Office 2007 that you deployed to your environment.

Next Steps
  • Please note that this problem exists only for WSS and MOSS 2007. SharePoint 2010 fixed this issue.
  • To understand more about site definitions (ONET.XML), you can follow this link for SharePoint 2010 and this link for MOSS 2007 and WSS.


Last Update:


next webcast button


next tip button



About the author
MSSQLTips author Guangming He Guangming He

View all my tips





Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Notify for updates 


Send me SQL tips:

    



Learn more about SQL Server tools