# Configuring Merge Fields for Microsoft Word & Excel

Using <a href="/en/gr/30965/">Merge Fields</a>, you can trigger Vault to search within a Microsoft Word (DOCX only) or Microsoft Excel (XSLX) source file and replace certain tokens with field values from the Vault document. Merging fields can make it easy to create templates that auto-populate with details like product name, document status, and version date. You can also use this to add a title page to a document that shows the document name or document number from the Vault.

Merge Fields for Microsoft Word and Microsoft Excel are automatically available in all Vaults. You must configure the feature before users can access it.

## Enabling Merge Fields

To set up merge fields, associate the standard shared document field **Merge Fields** with any document types where the functionality is needed.

You can specify field-level security settings on the document field _Merge Fields_ to limit which users can edit this field.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: It is best practice to keep the <em>Merge Fields</em> field hidden for all users. To prevent excess processing, avoid enabling merge fields on document types where they are unnecessary.</p>
    </div>
  </div>
</div>



## Finding Relationship & Field Names

The following steps enable you to find the relationship name and object field name:

1. From **Admin > Configuration > Document Fields**, locate the field name for the object reference field.
2. Add **`document_`** before the document field name, for example, `product__v` becomes **`document_`**`product__v`.
3. Add **`r`** after the document field name, for example, `document_product__v` becomes `document_product__v`**`r`**. This is the relationship name.
4. From **Admin > Configuration > Objects**, open the referenced object and navigate to the **Fields** tab in the object configuration. Locate the field name for the object field you wish to use.
5. Add a period and the object field after the relationship name, for example, `document_product__vr` becomes `document_product__vr`**`.abbreviation__c`**.
