Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Add Fields to a LibreOffice Document

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Adding fields to a LibreOffice document lets you insert dynamic content—like page numbers, dates, document titles, or author names—that updates automatically when the document changes. This is useful for headers, footers, title pages, and any place where you want consistent, up-to-date information without typing it manually. To get started, you only need a LibreOffice document (Writer, Calc, Impress, or Draw) and the document open. Fields work in all LibreOffice modules, but the steps below focus on Writer, the word processor, where they are most common.

What You'll Need

  • A computer with LibreOffice installed (any recent version).
  • A document open in LibreOffice Writer (or another module, but menus may differ slightly).
  • Basic familiarity with the menu bar and toolbar.

Step-by-Step

  1. Open your document in LibreOffice Writer. If you want fields in the header or footer, go to Insert > Header and Footer and choose the header or footer style you want to edit (e.g., Default Style). This opens the header/footer area for editing.
  2. Place the cursor where you want the field to appear. For example, in the header, click where you want the page number; in the body, click where you want the date.
  3. Insert a field using the menu: go to Insert > Field. A submenu appears with common options like Page Number, Page Count, Date, Time, Author, Title, Subject, and File Name. Click the one you need. The field is inserted immediately with the current value.
  4. For more field types, choose Insert > Field > More Fields… (or press Ctrl+F2). This opens the Fields dialog with several tabs: Document, Cross-References, Functions, DocInformation, and Variables. Browse through the tabs to find the field you want.
  5. Select the field type from the left list, then choose the format or options on the right. For example, under Document, select Page and choose a format like “1” or “Page 1”. Under DocInformation, you can pick Title, Author, Created, etc. After selecting, click Insert (or double-click the field name). The field appears in your document.
  6. Adjust field properties if needed. With the field inserted, right-click on it and choose Fields…. This opens a dialog where you can change the format, offset, or other options depending on the field type. For page numbers, you can set the offset (e.g., start at 0 or 1).
  7. Update fields manually when you change the document. Fields usually update automatically when you print, export to PDF, or reload the document. To force an update, press Ctrl+Shift+F9 (updates all fields) or F9 (updates the selected field).
  8. Edit or delete a field by clicking on it to select (it may show a gray background when selected), then press Delete to remove it. To edit, right-click and choose Fields… to change its properties.
  9. For headers and footers, after inserting a field, click outside the header/footer area or press Esc to return to the document body. The field will display the correct value for each page (e.g., page numbers).
  10. Save your document to keep the fields. Fields are stored with the document and will update when the document is opened or printed.

Common Mistakes

  • Typing page numbers manually instead of using fields. This breaks when pages are added or removed.
  • Forgetting to update fields after editing. Fields don’t always update live; use Ctrl+Shift+F9 to refresh.
  • Inserting fields in the wrong place—for example, putting a page number field in the body instead of the header/footer, which repeats on every page.
  • Choosing the wrong format for dates or numbers. Check the format options in the Fields dialog to match your locale.
  • Editing a field and losing the automatic update—if you manually type over a field, it becomes static text. Always use the field editor.
  • Not using the “More Fields” dialog for advanced fields like cross-references; the basic submenu only covers common ones.

Tips

  • Use Ctrl+F2 to open the Fields dialog quickly from anywhere.
  • For page numbers in headers/footers, insert the Page Number field and then type “of” and insert the Page Count field to get “Page 3 of 10”.
  • Fields update when you export to PDF, so you don’t need to manually refresh before sending.
  • If you want the document title to appear in the header, insert a DocInformation field for Title and set the document title via File > Properties > Description.
  • To see all fields in your document, go to View > Field Shadings (or press Ctrl+F8) to toggle gray highlighting on fields—this helps you spot them.
  • For cross-references (like “see page 12”), use the Cross-References tab in the Fields dialog; this updates automatically when page numbers change.

Troubleshooting

If fields don’t update automatically: Press Ctrl+Shift+F9 to update all fields. If that doesn’t work, check that the field is not set to “Fixed” (some fields like Date can be fixed). Right-click the field, choose Fields…, and uncheck “Fixed” if present.

If page numbers show wrong values: Check if you have multiple sections or page styles. Fields are per-section. Go to Format > Page Style and ensure the correct page style is applied. Also, check the offset setting in the field properties.

If a field shows a placeholder like “” instead of a number: This happens when field shadings are on (View > Field Shadings). It’s just a display toggle; the field will print correctly. Turn it off to see the actual value.

If the field is not inserted when you click a menu item: Make sure your cursor is in the document body or header/footer area, not in a text box or frame that may not support fields. Also, check that the menu item is not grayed out (which might mean the document is in read-only mode).

If fields disappear after saving and reopening: Fields are saved with the document, but if you saved in a format like .txt, fields may be lost. Save as .odt (or .docx) to preserve fields.

Frequently Asked Questions

Can I add a custom field that shows my own text?

Yes. In the Fields dialog, go to the Variables tab, choose User-defined, type a name and a value, and insert it. You can then update the value later.

How do I insert a field that shows the file name?

Go to Insert > Field > More Fields, select the DocInformation tab, choose File name, and set the format to “Path/File name” or just “File name”.

Why does my date field not update to today’s date?

Date fields can be set to “Fixed” (shows the date of insertion) or “Variable” (updates to current date). Right-click the field, choose Fields…, and uncheck “Fixed” to make it update.

Can I use fields in LibreOffice Calc or Impress?

Yes, but the menus differ. In Calc, use Insert > Field for page numbers or dates in headers/footers. In Impress, fields are available in headers/footers or text boxes via Insert > Field.

How do I make a field that shows the total number of pages?

Insert a Page Count field (under Document tab) in your header/footer. It will display the total number of pages in the document.

What is the shortcut to update all fields?

Press Ctrl+Shift+F9 to update all fields in the document. Press F9 to update only the selected field.