Skip to content
  • Home
  • Work
  • About
  • Blog
  • Contact

A 35 day calendar shape for Visio 2013

John Goldsmith's profile image

John Goldsmith

31 March 2014
  • General Use
  • ShapeSheet
  • Themes, Styles and Formatting
  • Visio 2013

A35DayCalendarShapeForVisio2013

The ‘Calendar’ stencil has some great shapes like ‘Month’ and ‘Multiple Week’ for scheduling and planning.  The template and stencil are part of a solution that includes an AddOn called Time Solution (‘ts’) and this is effectively a builder to create and write to all of the day sub-shapes (not to mention the Outlook import feature).

One thing I miss, though, is an easy way to print out multiple months that clearly show the difference between one month and the next.  I care less about whether a month breaks across pages and more about being able to easily identify each one.

So, in this post I’ve built a shape that takes a start date and displays the following thirty four days…

This is really just a simple alternative ‘Multiple week’ shape.  Given that the focus for this shape is to easily differentiate between multiple months, I’ve included shading on odd months (even one’s being plain).

Just so you can see the difference, here’s three images, the first showing the existing ‘Month’ shape:

VisioMonthShape

…a second, being the existing ‘Multiple week’ shape:

VisioMultipleWeekShape

…and the third showing the 35 day layout (including month shading):

Visio35DayShape

Shape Data

The shape’s behaviour is all driven via the ShapeSheet (no AddOns here) and the start date is defined through the Shape Data window:

Visio35DayShapeData

Formatting

The shape has two ‘color modes’, also set via Shape Data.  In Default mode, the shape will pickup the active theme’s fill color (including Variants) and use this in the shaded days fill, plus varying tints for line and text color.   For non-shaded days the theme’s ‘Light’ color is used, which is white in nearly all cases.   In Custom mode, you’re free to apply line, fill and text formatting via the UI in the normal way.

All other formatting features can be applied to the group shape and these will be propagated down to all of the sub-shapes.  If you want to revert to the inherited theme values, then you can just select the first item in the Quick Styles drop-down menu and you’ll be back to the default for the active theme:

TopLeftVariantColor

Download

I’m hoping that the shape’s operation is reasonably self-explanatory so if you just want to use the shape then you can download from here:

  • Download 35DayMonth.zip

The stencil file is in 2013 (.vssx) format, but if you using Visio 2010, it should still be ok with the Visio Compatibility Pack.  The theming should convert to the older 2010 approach but, as it stands, I’ve only tested on 2013.

Shape construction

From a shape building perspective, a couple of interesting points are:

EVALCELL() + ARG()  Each day sub-shape knows what date it is and carries a User.IsShaded cell.  The logic that determines whether an individual day should be shaded or not could be stored in the sub-shape itself but, if you wanted to change that logic later on, you’d have to iterate through each sub-shape to make the change.  Instead the logic can be stored in a single place, in the group shape and, making use of the EVALCELL ShapeSheet function, you can pass in the date argument (using ARG) to calculate the result.  So the existing logic in the group shape, to work out if a date sits within an even month, looks like this:

VisioIsEvenMonthFxand the corresponding sub-shape cell like this:

VisioIsShaded

However, if, for example, you wanted to change the shading logic to just shade weekends instead, you could change the group shape formula to the following:

VisioIsWeekendFxOf course if you wanted completely different logic that didn’t include evaluation of a date then you’d have to revisit the the sub-shape formulae too,  but I think this keeps things as flexible as reasonably possible. 

Chris Roth covered this set of functions when they appeared in Visio 2007, so head over there for more details.

Build by index  All of the sub-shapes size and positions are based on an index (0-34).  The reason for this is that as you’re building a shape with multiple child shapes, you can focus on a single sub-shape and then duplicate it when you’re ready to populate the group.  After each duplication you just need to set one cell (Prop.DayItemIdx in the the case below) and the ShapeSheet logic can handle to positioning based on a row and column grid system:

VisioBuildByIndex
Microsoft MVP Logo

John has been a Microsoft MVP, in the award categories of Visio and M365, since 2008.

Visio Blogs

  • Bill Morein (via Wayback Machine)
  • Chris Castillo (via Wayback Machine)
  • Chris Hopkins (via Wayback Machine)
  • David Parker
  • Eric Rockey
  • Jesse Phillips-Mead
  • John Marshall
  • Michel LAPLANE (FR)
  • Nikolay Belyh
  • Saveen Reddy (via Wayback Machine)
  • Visio Guy
  • Visio [Product] Blog
  • Visio Insights (via Wayback Machine)

Visio Resources

  • Developing Microsoft Visio Solutions
  • Visio Stencils at ShapeSource
  • Microsoft Visio YouTube Playlist
  • Visio (Product site)
  • Office 2010 Engineering
  • Visio 2016 SDK (Download)
  • Visio JavaScript API reference
  • VisioMVPs.org
Contact

visualSignals ltd
31 Riverview Grove
London, W4 3QL
United Kingdom

+44 (0) 208 078 9120

Around the Web

Copyright © visualSignals ltd 2025

Mastodon