---
title: "Document State"
canonical: "https://support.appfire.com/space/CDMC/2192677319/Document%20State"
format: markdown
---
> Macro (aura-html)

## Overview

When added to a Confluence page, the **Document State** macro displays information about the page’s current workflow state.

You can configure the macro to show one or more of the following:

- The current workflow state
- The date when the state was last changed
- The state’s expiry date (if applicable)

> ℹ️ Dates are shown in **Confluence UTC format** for both the state change date and the expiry date.
> ℹ️ 
> ℹ️ ![Comala Document State macro output showing current state](media://9ead8388-e88f-40a8-a797-683bcc6bc88b)
> ℹ️ 
> ℹ️ When no workflow is applied to the page, the document state macro displays the following message when editing the page and on the published page.
> ℹ️ 
> ℹ️ ![Comala Document State macro rendered on a page](media://e2483af6-2e04-418f-8bf4-511fa9245b99)

## Add the macro

To add the document state macro,

1. Open your Confluence page and type <span style="color: #4c9aff">/document state</span> to display the document state macro option.
2. Select **Document State** to add the macro to the draft page.
3. Now, click the **Edit** icon on the macro to open the macro editor.
4. To configure the macro, check the boxes for one or more of the following options:
  - **Show State** – Displays the current workflow state.
  - **Show Changed Date** – Displays the date the page transitioned to its current state.
  - **Show Expiry Date** – Displays the state’s expiry date, if one is set.
  The selected options will be previewed in the macro on the draft page.

![Comala Document State macro options and output examples](media://ff7f933d-a07c-4bab-bc94-f917c877e246)

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

## Use the document state macro with other Confluence macros

The document state macro is compatible with the Confluence [Page Properties macro](https://support.atlassian.com/confluence-cloud/docs/insert-the-page-properties-macro/#Use-the-Page-Properties-macro) and the [Page Properties Report macro](https://support.atlassian.com/confluence-cloud/docs/insert-the-page-properties-report-macro/).

To use the macro, 

1. Open a draft page and add the **document state** macro as a table value in the **page properties** macro.

![Comala Document State macro page properties editor](media://fc911104-1f8c-4076-bb33-0de96a85b30f)

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

![Comala page properties macro with Document State cell value on a page](media://efff63a6-ada9-4942-934f-177c50962b1b)

3. 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**.

![Comala page properties report macro with Document State values](media://9e275ffa-228c-4d1f-a3d0-0eb157778aaa)

Here’s a demo video that shows how to use the document state macro. 

## Exporting pages to PDF and Word

The **Document State **macro on-page information will be included when exporting the page to PDF or Word formats.

![Comala Document State macro rendered output on a published page](media://5c36420b-c33d-4953-9718-25d78cb45ffb)

## Page status (migration compatibility) macro 

The **page status macro** displays the current workflow state.

The macro is added to a document migrated to the cloud, where the source server content includes the Comala Document Management for Server **page status macro**.

> ℹ️ The **page status macro** is unavailable in the macro browser in a cloud site.
> ℹ️ 
> ℹ️ We recommend replacing the **page status macro** with the **document state macro** in your cloud content.

**Related topics**

- [Document approvals](https://appfire.atlassian.net/wiki/spaces/CDMC/pages/2192777118)

- [Document activity](https://appfire.atlassian.net/wiki/spaces/CDMC/pages/2193097355)

- [Workflow states](https://appfire.atlassian.net/wiki/spaces/CDMC/pages/2193066115)

- [Workflow state dialog](https://appfire.atlassian.net/wiki/spaces/CDMC/pages/2193129918)