Monday, September 3, 2012

Change the default file template for a document or form library

 

There are two ways you can change the default template:

  • If your document or form library has a default file template for a program compatible with SharePoint 2010, then you can edit the default template.
  • For other programs, you cannot directly edit the default template, but you can copy a new template file to the Forms folder of the library to specify a custom template.
Edit the default file template
  1. Navigate to the site containing the library for which you want to edit the default template.
  2. Click the name of the library on the Quick Launch, or click Site Actions, click View All Site Content, and then in the appropriate library section, click the name of the library.

NOTE    A site can be significantly modified in appearance and navigation. If you cannot locate an option, such as a command, button, or link, contact your administrator.

  1. In the ribbon, under the Library Tools section, click the Library tab, and then in the Settings group, click Library Settings.
  2. Under General Settings, click Advanced settings.
  3. In the Document Template section, under the Template URL box, click Edit Template. One of the following happens:

Document library    The template opens in an application that is compatible with SharePoint 2010 and that is associated with the file type of the current template. For example, Office Word 2010 opens if the default template is a Word template, or Office Excel 2010 opens if the default template is an Excel worksheet.

Form library    The template opens either in a program compatible with SharePoint 2010, either an XML-based form design program, such as Microsoft Office InfoPath 2010, or an XML editor.

NOTE    If people on your site already filled out forms that were based on the original template, consider how any changes to the template may affect those forms. For example, adding a field that users are required to fill out may cause errors to appear in the original forms that were filled out before the field was added.

  1. Make the changes that you want, and then save the template. Close the program if you no longer need it open, or switch to your site.
  2. Depending on your form design program, you may need to republish the template to the library on your site from your program.
  3. In your site, at the bottom of the Document or Form Library Advanced Settings page, click OK.
Specify a custom file template
  1. Create and save your custom template in a program that is compatible with SharePoint 2010. Make note of its location, and then switch to SharePoint 2010.
  2. Navigate to the site containing the library for which you want to specify a custom template.
  3. Click the name of the library on the Quick Launch, or click Site Actions, click View All Site Content, and then in the appropriate library section, click the name of the library.

NOTE    A site can be significantly modified in appearance and navigation. If you cannot locate an option, such as a command, button, or link, contact your administrator.

  1. In the ribbon, click the Library tab, and then in the Connect & Export group, click Open with Explorer.
  2. In Windows Explorer, browse to find the custom template that you created.
  3. Right-click the file, and then click Copy on the shortcut menu.
  4. Click the Back button until you return to the library, and then click the Forms folder to open it.
  5. Right-click in a blank area in the folder window, and then click Paste on the shortcut menu.
  6. Close Windows Explorer and return to the library on the site.
  7. On the Settings menu, click Library Settings.
  8. Under General Settings, click Advanced settings.
  9. In the Document Template section, do one of the following:

Document library    Type the address of your custom template in the Template URL box. The location is the Web address of the template on the site, relative to the name of the site. For example, if your template is called Watermark.dotx, and you add it to the Forms folder of the Shared Documents, document library, you would type the following:

Shared Documents/Forms/Watermark.dotx

Form Library    Type the address of the custom template that you want to use in the Template URL box. The location is the Web address of the template on the site, relative to the name of the site. For example, if your template is called Orders.xml, and you add it to the Forms folder of the Purchases form library, you would type the following:

Purchases/Forms/Orders.xsn

NOTE    If the settings in the Document Template box are not available, an administrator may have set up multiple content types. To see whether multiple content types are enabled, verify that Yes is selected under Allow management of content types? in the Content Types section immediately above the Document Templates section. If it is, you must edit the template for the content type.

 

Where the file templates are stored in the library

When a document or form library has a default file template, it is stored in the Forms folder of the library.

Open the library in Windows Explorer to see the Forms folder which contains the file template for the library.

The contents of the Folders folder in a document library

By default, a document library has a file template, called template.dotx, but you can change this file if you need to. To specify a different template, you need to first create it in a program that is compatible with SharePoint 2010, such as Office Word 2010, and then save it to the Forms folder of a library. Then, from the library, you specify the address of the custom template.

By default, a form library comes with a placeholder file, called template.xml, that you must replace with a form template that you create.

 

No comments:

Post a Comment