[Calendar:]UPDATED

Inserts a calendar.


Purpose

Inserts a calendar into the report, formatted as a table.


Compatibility

The macro can be used in the highlighted input document types only. A greyed-out icon indicates not supported.


Updates

v4.6One month ago · September 2026

The 'style' parameter now applies Word's own built-in style for the Grid Table 5 Dark, Grid Table 6 Colorful and Grid Table 7 Colorful families (and their Accent variants), rather than a look-alike custom style named 'Grid Table 5', 'Grid Table 6' or 'Grid Table 7'. Using one of these styles for several calendars or tables no longer leaves extra styles such as 'Grid Table 51' in the Word document.

History (3)
v4.6One month ago · August 2026

In Report Studio, a 'title' containing markup characters (angle brackets, ampersands) now renders literally, exactly as Word renders it, instead of being interpreted as markup.

v4.6One month ago · August 2026

The error shown when endDate and monthsToReport are used together now names those two parameters, rather than naming auto.

3 years ago · November 2022

The autoFit parameter now works with 'Content' or 'Window' values.


Parameters (11)
Behaviour (1)
Parameter TypePresencePurpose Options Default
auto
BooleanOptionalIf 'true', the reporting period will be the last calendar month and neither startDate nor endDate parameters may be used.
  • true
  • false
false
Colours (2)
Parameter TypePresencePurpose Options Default
highlightBackgroundColor
ColorOptionalThe highlight background color. Color [DarkBlue]
highlightForegroundColor
ColorOptionalThe highlight foreground color. Color [White]
Formatting (2)
Parameter TypePresencePurpose Options Default
autoFit
AutoFitBehaviorOptionalThe autofit behaviour. 'Content' fits the table to the content. 'Window' sets the table width to 100%.
  • Content
  • Fixed
  • Window
Content
style
StringOptionalThe table style. N/A Table Grid
Time & Date (3)
Parameter TypePresencePurpose Options Default
endDate
DateTimeOffsetOptionalThe end date in the format YYYY-MM-DD. N/A Midnight on the first day of this month
monthsToReport
Int32OptionalIf set, sets 'endDate' to the 'start' plus the specified number of months. N/A N/A
startDate
DateTimeOffsetOptionalThe start date in the format YYYY-MM-DD. N/A Midnight on the first day of last month
General (3)
Parameter TypePresencePurpose Options Default
highlightIsBold
BooleanOptionalWhether highlighted dates are shown in bold.
  • true
  • false
true
highlightTimeRanges
StringOptionalThe time ranges to highlight (currently only single dates are supported). N/A N/A
title
StringOptionalThe calendar title. N/A N/A

Examples (3)

Example 1

A plain calendar. By default, this covers the previous calendar month.

[Calendar:]

Example 2

Control start and end dates and highlight time ranges.

[Calendar: startDate=2015-10-01, endDate=2015-11-01, highlightTimeRanges=2015-10-03;2015-10-06;2015-10-07]

Example 3

Modify the highlight style.

[Calendar: startDate=2015-10-01, endDate=2015-11-01, highlightTimeRanges=2015-10-03;2015-10-06;2015-10-07, highlightForegroundColor=Red, highlightBackgroundColor=White]

Reconnection

Reconnection

Reconnection

timed out

timed out

Attempt of

Reload
An unhandled error has occurred. Reload 🗙