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

## Overview

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

![cdx_documentsatemacro_onpage_utcformat.png](media://2ff2ba1e-ae59-4d3d-b42c-0829e1a0ec1b)

The macro can be configured to display one or more of the following

- the workflow state
- date of the change to the state
- state expiry date (if the state has an expiration)

Confluence UTC format is used for the

- *date of change to the state*
- *state expiry date*

![cdx_approvedstate_documentstatemacro_onpage_approved_withexpirydate_utcformat.png](media://aa8e4540-ea5a-4252-b781-2459ee372609)

> ℹ️ The **document state** macro is only displayed on the page when a 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://46a2d887-042a-4776-a8d7-368e543c41cf)

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

![image](media://70ba6e44-66e1-489f-b63f-cc957e2bdad3)

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

![image](media://612505f0-d9d9-456b-af92-2e8360191dc0)

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**
- state expiry date (if the state has an expiration) - **Show Expiry Date**

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

![cdx_documentsatemacro_draftpage_reviewstate.png](media://f013a690-c7ff-496e-9afd-0793c28ef505)

**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://4c89a7e7-2a7b-49b0-9d15-82c32f93306f)

> 📝 The macro was updated on 7/1/2024. Content of the updated document state macro may not be available in an 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 a draft page

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

![image](media://eaaca22d-38d8-4378-b02c-4bf72935d561)

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

![cdmc_pagepropertiesmacro_cellvalue_onpage.png](media://5b3f1a69-b965-4cd2-b61d-1f1267c9c5a8)

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://989b4f58-5455-4d56-92a0-70bdba845813)

## Exporting to PDF or Word

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

![image](media://2218c8eb-2673-44bc-9649-54f98fe1ecaa)

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