---
title: "How to export footnotes/endnotes to DOCX"
source: https://dev.pageseeder.com/get_started/tutorials/how_to_export_footnotes_endnotes_to_docx.html
last_updated: 2026-09-05T16:43:52+10:00
tokens: ~2066
---

# How to export footnotes/endnotes to DOCX

| Property | Value |
| --- | --- |
| Skills required | XML |
| Time required (minutes) | 15 |
| Intended audience | Developer |
| Difficulty | Easy |
| Category | Document |

## Objective

This tutorial demonstrates how to create footnotes or endnotes and export them to Word DOCX.

## Prerequisites

To complete this tutorial requires:

- PageSeeder administrator access to a server with PageSeeder version 6.2 or later installed.

All the files for this tutorial are on [Github](https://github.com/pageseeder/pageseeder-tutorials/tree/master/configuring_publications).

## Tutorial

### Project setup and installing configuration bundle

1. Login to PageSeeder as an administrator.
2. Go to the project where you would like to install these capabilities. Alternatively, create a new project by clicking the tools **System administration **button at top right. Then click on **New project** under **Projects & Groups** and enter a project name, plus any description, then **Submit**.
3. Click the wrench **Project administration** button at the top.
4. Select **Template files** from the left menu and click the magic **Create** button at the bottom of the page to open the **Samples dialog**.
5. **Install a configuration bundle** – Click the filestack **Bundle** button, then in the **Bundle type** field, select **Document type** from the dropdown.


  1. Click the **Select** button to the right of a bundle – for this example, select **Basic auto-numbered publication**. *You can also select **Intermediate** or **Advanced** if you want bibliography or glossary features.*
  2. Install the bundle under the root document type for your publication (e.g `references`, shown in the Document type field on the right of the dialog). **Click Install**.

#### Verify package content - project configuration files

In the **Template files** page, check the files as follows.

##### Export process

The `psml/references/export` folder (or the document type you specified) contains the following files:

| Filename | Description |
| --- | --- |
| `build.xml` | Custom ANT script for exporting to `.docx`. *Not required but is used for this tutorial.* |
| `psml-to-docx.xsl` | XSLT that adds the document labels necessary to format the publication root document. *Not required but is used for this tutorial.* |

##### Document types

Select **Template configuration** from the left menu which should display these PSML document types:

| Document type | Description |
| --- | --- |
| `default` | The content of a publication. Includes a CSS style to display footnote and endnote references as superscripts in the user interface. |
| `references` (or your type) | The root document of a publication. Includes the custom export configuration. |
| `endnotes` | Endnotes for a publication. |
| `footnotes` | Footnotes for a publication. |
| `help` | *Not required for this tutorial.* |

##### XRef configuration

Select **Edit XRef configs** (top right).

| Filename | Description |
| --- | --- |
| `xref-config.xml` | The [Xref configuration](/guide/configuration/psml/psml_xref_config.md) for the import of cross-references including footnotes, endnotes, citations, and more as listed below. |

The following xref configs should be listed (see [Xref config](/guide/configuration/psml/psml_xref_config.md)):

- **footnote** – to insert a footnote reference.
- **endnote** – to insert an endnote reference.
- **para** – *Not required for this tutorial.*
- **internal-para** – *Not required for this tutorial.*
- **numbered-heading** – *Not required for this tutorial.*
- **caption** – *Not required for this tutorial.*

### Creating a publication

Create a publication root document and content as follows:

1. In PageSeeder go to a group under the project from Step 1. Alternatively create a new group by clicking the wrench **Project administration** button at the top. Then select **Create group** from the left menu and enter a group name, plus any description, then **Submit **and **Go to group**.
2. In this group create or open an existing document of the root type you selected previously (e.g. `references` ).
3. Click the **Document information** icon on the right, click **Make this document a publication**, ensure there is a Publication ID and for this example, select Publication type "`default`". Click **Submit** then **Save**.
4. If there is no existing content, double-click in the root document, click **Browse** and create a document (for example `default` type), select it and save. On the root document, press **Ctrl-S** to save everything.
5. Click a content document, add some headings and paragraphs if required.

### Footnotes or Endnotes

The model for this implementation is that a custom link type generates a simple link title and prompts the user to create a new fragment, or refer to an existing one, in the footnote or endnote document.

The generation of the link title, an “f” or an “e” with a numeric qualifier, happens when saving the xref. Upon export of the publication to Word, there is a transformation of these objects to native DOCX footnotes or endnotes.

This solution requires the creation of custom document types to hold the footnote or endnote fragments. Whether this document already exists will depend on whether the content came from an imported DOCX file that already had footnotes or endnotes, or whether the document is being written in PageSeeder.

To determine this, follow these steps:

1. Go to the folder containing your content documents.
2. Create a document with document type **Footnotes**. If you get an error, then it already exists, otherwise click the pencil icon at top right to enter edit mode.
3. Add one or more fragments containing footnote content.
4. Create a document with document type **Endnotes**. If you get an error, then it already exists, otherwise click the pencil icon at top right to enter edit mode.
5. Add one or more fragments containing endnote content.
6. In a content document, enter edit mode by double-clicking on a paragraph.
7. Place the cursor in the text and select the xref **Insert/edit cross-reference** icon, available either in the document toolbar at the top or in the editing context menu when you right-click in the text. The Xref dialog opens.
8. In the **Configuration** field, select the XRef configuration, either **Footnote** or **Endnote**, from the drop-down. The Footnotes or Endnotes document displays in the main section. The process for inserting both footnotes and endnotes is similar. The following images display the footnote process:  
![Select an Xref configuration for your xref](/content/images/tutorials/how_to_configure_publications_files/xref-to-footnote-configuration-field.png) 
9. In the main section, click on the footnote fragment that you want to reference.  
![Select a footnote fragment to reference](/content/images/tutorials/how_to_configure_publications_files/xref-to-footnote-select-a-footnote.png)
10. The xref details display. The "Title template" field contains the link title that displays in your document. It has the generated letter “f” and the `{fragment}`, which is automatically populated with a numeric qualifier – the fragment number in the footnotes document – when you save the xref details. The "Link type" field shows `alternate` (as specified in the footnote [xref template](/guide/configuration/psml/psml_xref_config.md)).  
![Footnote link text and link type](/content/images/tutorials/how_to_configure_publications_files/xref-to-footnote-link-title-and-link-type.png)
11. Click **Save** to insert the xref in your document. In the following image, the link text "f4" references fragment 4 in the Footnotes document. Press **Ctrl-S** to finalize the insertion.  
![Xref inserted – showing generated link title](/content/images/tutorials/how_to_configure_publications_files/xref-to-footnote-inserted-footnote.png)

### Export as a Word document

1. Go to any document in your publication.
2. Click the Document export (rocket) icon in the left margin.
3. Under the **Choose an export action** drop down, select **Export publication as custom DOCX** and click **Run**.
4. Open the document in Microsoft Word and see how the footnotes and endnotes are displayed by Word.

