How to Build Word Template With Theme Inheritance From Parent Library
🔍 WiseChecker

How to Build Word Template With Theme Inheritance From Parent Library

You need a Word template that automatically inherits colors, fonts, and effects from a parent theme stored in a SharePoint library. Without proper configuration, templates either hardcode formatting or fail to update when the parent theme changes. This article explains how to create a Word template that links to a parent theme library so all child documents reflect the latest theme updates. You will learn the exact file structure, theme storage steps, and template linking method required for inheritance.

Key Takeaways: Building a Theme-Inheriting Word Template

  • SharePoint theme library as parent: Store a .thmx or .xml theme file in a designated library to serve as the single source of truth for colors, fonts, and effects.
  • Template linking via ThemeDocumentElements: Edit the template’s XML to reference the parent theme file path so Word pulls formatting from the library instead of embedded defaults.
  • Relative vs absolute paths: Use a server-relative URL in the template to ensure inheritance works across site collections and subsites without breaking.

ADVERTISEMENT

How Theme Inheritance Works in Word Templates

A Word template (DOTX or DOTM) can store theme components either as embedded data or as external references. When you embed a theme, the colors, fonts, and effects become static — changing the original theme file does not update documents based on that template. Theme inheritance solves this by keeping the theme definition in a parent library and having the template point to that external file.

The parent library is typically a SharePoint document library that contains a theme file in one of two formats: Office Theme (.thmx) for Office 2010–2013 compatibility, or a plain XML file containing the full theme definition for newer versions. The template itself stores a reference inside its XML part named Theme, specifically in the ThemeDocumentElements section. When Word opens the template, it reads the path, retrieves the theme from the library, and applies those settings to any new document created from the template.

Prerequisites for this setup include access to a SharePoint site where you can store the theme file, permissions to edit the template’s XML, and a copy of Word 2016 or later (Office 365). The theme file must be accessible to all users who will use the template — anonymous or external users may require additional permissions.

Steps to Create a Template With Theme Inheritance

Step 1: Prepare the Parent Theme File

  1. Create the theme file
    In Word, apply the desired color palette, font set, and effects to a blank document. Go to Design > Themes > Save Current Theme. Name the file and save it as an Office Theme (.thmx) file to a local folder.
  2. Convert to XML (optional but recommended)
    For best compatibility with SharePoint, rename the .thmx file to .zip, extract the contents, and locate the theme1.xml file. This XML file contains the full theme definition. Upload this XML file to your SharePoint parent library instead of the .thmx file. Word can read both formats, but XML is easier to maintain and version.
  3. Upload to SharePoint library
    Create a new document library called “Corporate Themes” (or similar) on your SharePoint site. Upload the theme XML file into that library. Note the server-relative URL of the file, for example: /sites/marketing/Corporate%20Themes/CompanyTheme.xml

Step 2: Create the Base Template

  1. Start a new blank template
    Open Word and select File > New > Blank document. Go to File > Save As and choose Word Template (.dotx). Save the template locally before editing its XML.
  2. Add placeholder content and styles
    Insert sample text, tables, and images to represent the final template layout. Apply styles like Heading 1 or Normal, but do not manually set colors or fonts — they will be inherited from the parent theme.
  3. Save the template
    Save the template file as template.dotx on your local drive.

Step 3: Edit the Template XML to Add the Theme Reference

  1. Rename the template to .zip
    In File Explorer, rename template.dotx to template.zip. Confirm the extension change when prompted.
  2. Extract the zip archive
    Right-click the .zip file and select Extract All. Open the extracted folder. You will see a folder structure including _rels, docProps, and word.
  3. Locate the theme XML file
    Inside the word folder, find the file named theme1.xml. Open it in a text editor such as Notepad++ or Visual Studio Code.
  4. Modify the theme reference
    In theme1.xml, locate the element . Above this element, add the following namespace declaration if it is not already present: xmlns:a=”http://schemas.openxmlformats.org/drawingml/2006/main”. Then, inside the root element, add a child element called with a reference to the parent theme file. The exact XML structure depends on your Word version. For Word 2016 and later, use:

    <a:themeDocumentElements>
    <a:themeDocumentElement r:id="rId1" />
    </a:themeDocumentElements>

    Replace rId1 with a relationship ID that you will define in the next step.

  5. Add the relationship to the parent theme
    Open the file _rels/.rels in the root of the extracted folder. Add a new Relationship element:

    <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="https://yoursharepointsite.com/sites/marketing/Corporate%20Themes/CompanyTheme.xml" />

    Use the full server-relative URL of the parent theme file. Save the .rels file.

  6. Repackage the template
    Select all extracted files and folders, right-click, and choose Send to > Compressed (zipped) folder. Name the new zip file template.zip. Rename it back to template.dotx.

Step 4: Test the Inheritance

  1. Upload the template to SharePoint
    Upload the modified template.dotx to the same SharePoint library or a different template library.
  2. Create a document from the template
    Open the template from SharePoint and create a new document. Verify that the colors, fonts, and effects match the parent theme file.
  3. Update the parent theme
    Edit the CompanyTheme.xml file in the parent library and change a color value. Create a new document from the template — the new document should show the updated color. Existing documents will not update unless you manually reapply the theme.

ADVERTISEMENT

Common Issues When Setting Up Theme Inheritance

Word Cannot Find the Parent Theme File

If Word shows a placeholder theme (often black and white) or ignores the reference, the URL in the .rels file may be incorrect. Ensure the URL is a server-relative path starting with / (for example /sites/marketing/Corporate%20Themes/CompanyTheme.xml). Avoid using absolute URLs with http:// unless the SharePoint site is configured for anonymous access. Also confirm that the user has at least Read permissions to the parent library.

Theme Changes Do Not Apply to Existing Documents

Theme inheritance only applies when a new document is created from the template. Existing documents store their own copy of the theme. To update an existing document, open it, go to Design > Themes, and select Browse for Themes. Navigate to the parent library and choose the theme XML file. This manually reapplies the parent theme.

Template Fails to Open After XML Editing

If the template becomes corrupted, you likely introduced a syntax error in the XML. Validate the theme1.xml and .rels files using an XML validator before repackaging. Common errors include missing closing tags, incorrect namespace URIs, or duplicate relationship IDs. Always keep a backup of the original template before editing.

Embedded Theme vs Theme Inheritance: Key Differences

Item Embedded Theme Theme Inheritance
Theme storage location Inside the template file External SharePoint library
Updates to theme Must re-edit and redistribute template Edit one file in the library — all new documents use it
Network requirement None — works offline Requires SharePoint connectivity
Permission needed None Read access to parent library
File size Larger (theme data embedded) Smaller (only reference stored)
Best for Standalone templates or offline use Enterprise branding with centralized control

Theme inheritance gives you a single point of control for corporate branding. When you need to update the company color palette or fonts, you edit one theme file in the parent library. All templates that reference that file will automatically use the new theme for any new document. This reduces the effort of updating dozens or hundreds of templates individually.

ADVERTISEMENT