---
title: "Document state macro"
canonical: "https://support.appfire.com/space/CDACL/689832842/Document%20state%20macro"
format: markdown
---
> Macro (aura-html)

## Overview

When added to a page, the **document state **macro displays information on the approval workflow state of the page.

![cdx_documentsatemacro_onpage_utcformat.png](media://bfb24e4d-59e3-4c90-b5b8-b09f8a27103f)

The macro can be configured to display

- the approval workflow state
- date of the change to the state

Confluence UTC format is used for the *date of the change to the state.*

> ℹ️ The **document state** macro is only displayed on the page if an approval workflow is applied.

## Adding the macro to a page

Edit the page and type <span style="color: #4c9aff">/doc</span> to display the **Document State** macro option.

![image](media://8948e46d-aea6-4ab5-a1f7-0b1b0d503d21)

Choose **Document State** to add the macro to the draft page.

![image](media://43096816-a034-4762-9d42-d2c306804e03)

Select the macro and choose the pencil icon to open the macro editor.

![image](media://7fe0f871-cd49-4d9f-be2a-3bd117ec3efe)

Check the required boxes to configure the macro to display one or more of

- the workflow state - **Show State**
- date of the transition to the state - **Show Changed Date**

Selected macro options are previewed in the macro on the draft page.

![cdx_documentsatemacro_draftpage_reviewstate.png](media://9564450a-4e21-47a2-9369-5a269ea884cf)

**Publish **the page to view the document state macro displayed in the page subtitle on the content.

![cdxc_documentstatemacro_onpage_feviestate_withchangeddate_nopagetitle.png](media://bd3f5d33-63a5-4499-ad5f-ca93810dabb8)

> 📝 The macro was updated on 7/1/2024. Content of the updated document state macro may not be available in the earlier version of a document.

## Use with other macros

> ℹ️ The document state macro is compatible with the Confluence Page Properties macro and the Page Properties Report macro.

On the draft page

- add the **document state** macro as a table value in the **page properties** macro

![image](media://bf751634-9a45-411e-ac6b-1c3e382f9c3e)

The macro on the published page is rendered in a table.

![cdmc_pagepropertiesmacro_cellvalue_onpage.png](media://a33f3ffa-54ec-4f94-be8b-d45d9a18ea04)

The page properties report macro can be added to a page to report the value of the example page property we created - **Comala Management App - State details**.

![cdmc_pagepropertiesreportmacro_cellvalue_onpage.png](media://1903175f-afdf-4160-bf18-a62af2269495)

## Exporting pages to PDF and Word

The document state macro on-page information is included when exporting to PDF or Word.

![image](media://63c31882-ba46-4f7d-86db-41e60f221bae)

> 📝 In the PDF and Word export, any date information (if included in the macro configuration) is in UTC format.