Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

You can set an Open Document Format (ODF) file as the default file template for a document library. This way, when someone creates a new file in the library, the file opens and saves as an ODF file. People can use a program of their choice to edit the new file.

You can also specify other settings or provide default content that appears in every new file, such as a preferred outline for a marketing campaign proposal or an official disclaimer in a page footer.

To set up multiple templates for a library, you need to create site content types and hook those up to the library, rather than use the default template for the library.

Note: You need Full Control permission to set up a template for a document library. You need Full Control permission for the site to set up site content types.

What do you want to do?

Learn about file templates in a document library

Where the file templates are stored in the library

When a document has a default file template, it's stored in the Forms folder of the library.

Open the library in File Explorer to see the Forms folder which contains the file template for the library. Make sure you're showing hidden files in File Explorer (In File Explorer, click View > Hidden items.)

The contents of the Forms 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, you specify the address of the custom template in the advanced library settings.

Using content types to set up document library templates

You don't necessarily need to use content types if all you want is a custom template for one library. In that case, you just change the default file template for an existing library. You should consider using site content types, though, if you want to reuse the same template in multiple libraries.

For existing libraries with multiple content types already enabled and templates specified for those content types, you need to customize the site content types for the library. That's because the library uses the templates that are specified by the content types, and not the default file template.

If you want to use multiple templates for the same library, you need to use content types. For new libraries, create the library (Settings > Add an App > Document Library) and then set up multiple custom templates for the library.

Top of Page

Create a document library

If you don't already have a document library, follow these instructions to create one.

  1. On the site where you want to create the library, click Settings Settings: update your profile, install software and connect it to the cloud > Add an App.

  2. Click Document Library and enter a name for the library.

    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.

    Document library

Top of Page

Create an ODF template

You can create an ODF file from any program that is compatible with ODF. To create an ODF template from a Microsoft Office program, create or open a file and then save the file as an OpenDocument file type. For example, with a file open in Word, click File > Save As, choose the location where you want to save to, and then set the Save as type to OpenDocument Text (*.odt).

Top of Page

Change the default file template for a document library

There are two ways you can change the default template:

  • If your document 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. In the library where you want to edit the default template, click Library > Library Settings.

  2. Under General Settings, click Advanced settings.

  3. In the Document Template section, under the Template URL field, click Edit Template.

    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.

    Library settings, under advanced settings showing edit template field.

    Note: If your site is a part of a Microsoft 365 subscription, you may be asked to enter your Microsoft 365 user name and password.

  4. 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.

  5. In your site, at the bottom of the Document Library Advanced Settings page, and click OK.

Top of Page

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. Go to the library where you want to specify a custom template.

  3. Click Library > Open with Explorer.

    Important: If File Explorer doesn't open or you see an error message, you may have to add your site as a Trusted site in your browser settings. For more information, see the topic How to use the "Open with Explorer" command and how to troubleshoot issues with this option in SharePoint in Microsoft 365.

  4. Open another File Explorer and browse to the custom template that you created.

  5. Copy or drag your custom template to the Explorer window that's open to the site library where you want to specify the custom template.

  6. Close File Explorer and return to the library on the site.

  7. Click Library >Library Settings.

  8. Under General Settings, click Advanced settings.

  9. In the Document Template section, 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 ODT_Document.odt, and you add it to the Forms folder of the Shared Documents, document library, you would type the following:

    Shared Documents/Forms/ODT_Document.odt

    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.

Top of Page

Set up multiple custom templates for a library by using site content types

Most libraries can contain multiple content types. By defining multiple content types for a library, you can make it easy to build libraries that store different types of documents together in one place. For example, a library can contain both the documents and the graphics related to a project. In the library, the graphic files are listed with the columns of information assigned to the graphics content type and the documents are listed with the columns assigned to the document content type.

Site content types help make it easy to provide consistency across a site. As a site owner, you set up the content type with the characteristics that you want, such as a certain template, specific metadata, and so on. Then, you associate the site content type with the library so that when a user chooses an item from the New Document menu, they are using the content type that you defined.

New Document command in a library with custom templates

To make sure that ODF documents have consistent content across a site and its subsites, you can associate an .odt, .ods, or .odp template with a site content type.

Top of Page

Create an ODF site content type

Repeat these steps for each site content type that you want to create.

Important: To create site content types for a site, you must have Full Control for that site. To create site content types for the top-level site in a site collection, you must be a site collection administrator.

  1. Go to the site for which you want to create a site content type.

  2. Click Settings Office 365 Settings button > Site Settings.

  3. Under Web Designer Galleries, click Site content types.

    Web Designer Galleries options from the Site Settings page in SharePoint Online

    The Site Content Types gallery shows all the existing site content types, grouped in categories. Use the Show Group list to filter the view of content types.

  4. Click Create.

  5. On the New Site Content Type page, provide a name (for example, ODT_Document) and a description for the new content type.

  6. In the Parent Content Type section, under Select parent content type form, select Document Content Types, and then under Parent Content Type, choose Document.

  7. In the Group section, select Document Content Types from the Existing group list.

  8. Click OK.

    The Site Content Type page opens. Your next step is to associate an ODF document template with the site content type you just created.

Top of Page

Associate an ODF document template with a site content type

After you create your ODF content type, you're ready to associate the ODF template you created with the site content type. If you don't have a template yet, see Create an ODF template.

  1. On the Site Content Type page, under Settings, click Advanced settings.

    If you weren't already on the Site Content Type page, click Settings > Site Settings > Site content types to go there.

  2. Enter the location of the template:

    • If the template is stored on your site, click Enter the URL of an existing document template, and then type the URL for the template that you want to use.

    • If the document template is stored on your local computer, click Upload a new document template, and then click Browse. In the Choose File dialog box, locate the file that you want to use, select it, and then click Open.

      Add Template text boxes on the Advanced Settings page for a content type

  3. Under Update all content types inheriting from this type?, click Yes if you want to update all content types that inherit from this content type with the document template.

  4. Click OK.

Top of Page

Turn on multiple content types in a library

Before you can add different kinds of content types to a library, you need to turn on support for multiple content types. You do this once for each library where you want to use content types.

Note: You can’t enable multiple content types in a wiki library.

  1. In the library where you want to enable multiple content types, click Library > Library settings.

  2. On the Settings page, under General Settings, click Advanced Settings.

  3. On the Advanced Settings page, in the Content Types section, click Yes under Allow management of content types?.

    The Template URL in the Document Template section will now be grayed to switch from using a default template for this library to using site content types.

  4. Change any other settings that you want, and then click OK.

Top of Page

Add ODF content types to a library

The last step is to add the ODF content types to the library. You can add multiple content types to the library all at the same time.

  1. In the library where you want to add the content type, click the Library > Library Settings.

  2. On the Settings page, under Content Types, click Add from existing site content types.

  3. In the Select Content Types section, in the Select Site content types from list, select Document Content Types.

  4. In the Available Site Content Types list, click the names of the content type that you want, and then click Add to move the selected content type to the Content types to add list.

  5. When you finish selecting all of the content types that you want to add, click OK.

Top of Page

More information about site content types and libraries

To learn more about content types and how they work with libraries, see the following links:

Top of Page

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!