---
title: "Creating and Inserting Document Variables"
description: "For frequently used texts or formulations in Disclosure Management documents, document variables can be used, which can be retrieved and inserted in every MS Excel or MS Word file via the MS Word or MS Excel ribbon."
source_url: https://support.lucanet.cloud/en/documentation/disclosure-management/work-with-msoffice/use-document-variable
language: en
last_updated: 2023-08-16
---
# Creating and Inserting Document Variables

## Overview

For frequently used texts or formulations in Disclosure Management documents, **document variables** can be used, which can be retrieved and inserted in every Excel or Word file via the **Word** or **Excel ribbon**.

In Disclosure Management, predefined document variables are available for the **year**, **previous year**, and **reporting date**. Additional custom variables can be created in the **Variables** workspace.

## Creating Document Variables

Document variables are created in the **Variables** workspace. The **Variables** workspace is displayed as follows, for example:

Worskspace 'Variables'

To create a new variable:

{% stepper %}
{% stepper-step %}
Click **Add new variable**.
{% /stepper-step %}
{% stepper-step %}
Enter the **Name**, **Description** (optional), and **Value** of the variable.
{% /stepper-step %}
{% stepper-step %}
Click **Create**.

 The new variable is created and can be inserted into a Word document (see following section).

{% /stepper-step %}
{% /stepper %}
## Inserting Document Variable

To insert a document variable in Excel or Word documents:

{% stepper %}
{% stepper-step %}
Select a cell in an Excel file or place the cursor at the desired position in a Word file.
{% /stepper-step %}
{% stepper-step %}
Click **Insert Document Variable** in the Excel or Word ribbon.

Inserting a document variable via the Word ribbon

 The **Insert Document Variable** dialog will be displayed. The dialog lists all the document variables that have already been created, along with their **Name**, **Value**, and **Description**. Initially, this will contain document variables for the **current year**, **previous year**, and **reporting date**:

'Insert Document Variable' in MS Word

{% /stepper-step %}
{% stepper-step %}
Select the desired document variable.

{% /stepper-step %}
{% stepper-step %}
Click **Insert document variable**.

{% /stepper-step %}
{% /stepper %}
{% info-box %}
When you insert document variables in MS Excel, corresponding names are created automatically for the relevant cells (see [Names and Name Extensions in MS Excel](https://support.lucanet.cloud/en/documentation/disclosure-management/work-with-msoffice/excel-files-disclmgmt/setup-excel-file.md)).
{% /info-box %}
