LibreOffice Writer Variables and Statistics Fields

LibreOffice Writer allows users to automate dynamic content and track document metrics using built-in field commands. This guide details the user-defined variables and document statistics fields available in LibreOffice Writer, explains their functions, and outlines how to insert them directly into your text.

How to Access the Fields Dialog

To access all available fields in LibreOffice Writer, navigate to Insert > Field > More Fields… from the top menu, or press the shortcut key Ctrl + F2 (Command + F2 on macOS). The dialog is divided into tabs, primarily Variables and DocInformation (or Document), which contain variables and statistics respectively.


User-Defined Variables

User-defined variables allow you to store, calculate, and display custom information across your document. These are located in the Variables tab of the Fields dialog:


Document Statistics Fields

Document statistics fields dynamically pull real-time metadata and metrics about the document. These can be found under the Document or DocInformation tab (under the Document Statistics or Statistic type):


Steps to Insert Variables and Statistics

  1. Place your cursor in the document where you want the dynamic field to appear.
  2. Press Ctrl + F2 to open the Fields window.
  3. Choose the Variables tab for custom variables, or the DocInformation / Document tab for document statistics.
  4. Select the desired Type from the left list and choose the specific Select property or format from the right columns.
  5. Enter any required names or initial values in the input boxes at the bottom.
  6. Click Insert, then click Close.