Tuesday, September 4, 2012

Set a file template for a document or form library in SharePoint 2013

 

Set up a default file template when you create a document or form library

  1. Navigate to the site where you want to create the library.
  2. Click Settings, Settings: update your profile, install software and connect it to the cloud and click More Options.
  3. Click either Document Library or Form Library.

    NOTE    The Form library template uses only Microsoft InfoPath as the default file format.

Document library Form 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. Click Advanced Options.
  2. image
  3. Enter a name, an optional description of the library, and choose whether SharePoint should create a version of files in the library each time they are edited.
  4. For a Document library, select the default application file format and version from the Document Template drop-down.

Select a template

NOTE    The library name is required and appears at the top of the library page, becomes part of the address for the library page, and appears in navigational elements that help users to find and open the library.

To save the library as a template

  1. Go to the library you just created, select the Library tab on the ribbon, and then select Library Settings from the Settings group on the ribbon.
  2. Under Permissions and Management, select Save document library as template.
image
  1. Enter a file name and template name and description. If you want new libraries created from this template to include items in this template library, select the Include Content checkbox.

NOTE    The extension you use for the filename in the File name field, dictates the default file type for the template. The following file types are available by default:

  • None
  • Microsoft Word 97-2003 document
  • Microsoft Excel 97-2003 spreadsheet
  • Microsoft PowerPoint 97-2003 presentation
  • Microsoft Word document
  • Microsoft Excel spreadsheet
  • Microsoft PowerPoint presentation
  • Microsoft OneNote 2010 Notebook
  • Microsoft SharePoint Designer Web page
  • Basic page
  • Web Part page

image

  1. Select OK. image
  2. You can set the properties for the template library as you would any other library.
Creating a file template for a form library

To create or customize a template in a form library, you can use an XML-based form design program that is compatible with SharePoint, such as InfoPath. There can be additional advantages to using a form design program. For example, when you use InfoPath, you can do the following:

  • Create the form library and template directly from InfoPath.
  • Conveniently edit and re-publish the form template to the form library.
  • Merge the individual XML data files created from some form templates for further processing.
  • Promote the fields of XML data to library columns in the form library.

When a user creates a form, it opens by default in the form-editing program that is compatible with SharePoint on the user’s client computer. If no compatible program is installed, the form, if it is designed to open in the browser can open in the browser. If you want, you can specify that a form designed to open in a browser always opens in the browser. You can change the default behavior in the Opening Documents in the Browser setting in the advanced settings of the library.

Library Settings

Click the Library Settings command to get to Settings dialog

Advanced settings for libraries

Settings for a document library

Open in browser

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, 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 Settings Settings: update your profile, install software and connect it to the cloud, click View Site Contents, and 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 field, click Edit Template. One of the following happens:

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

Top of Page TOP OF PAGE

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

Edit template

Edit the default library template

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. Make note of its location, and then switch to SharePoint.
  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 Settings Settings: update your profile, install software and connect it to the cloud, click View Site Contents, 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, such as Word, 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