A Visio Deck of Cards

Sometimes I try ideas out in Visio without a specific goal in mind, and I have been creating a Visio deck of cards recently, so I thought I would share it. In fact, I have only created one card but it is capable of being any card in the deck by changing its shape data! I can even get a randomly generated card … all without any code except for formulas in the ShapeSheet.

Firstly, I used four icons for hearts, clubs, diamonds and spades, from my set of metro icons stencils ( see https://blog.bvisual.net/2012/11/20/announcing-metro-icons-and-a-windows-app-tile-shape-for-visio/ ). I decided to keep the icons for the suits separate, with four per suit, but linked their visibility to a Suit Shape Data fixed list row. I also displayed the Value Shape Data as the text of each icon.

imageI added a Face Up Shape Data row so that the suit and value are hidden by the Microsoft Office logo.

I also created a Card Rack shape that automatically drops four playing cards into it when you drag and drop it on the page.


The Legend shape is the Microsoft one, and it will display the number of cards dropped onto the page that it is placed on.

Each card has Shape Data


Alternatively, the right-mouse menu of the card shape provides the ability to change most of the Shape Data, and features some nice suit icons to boot!

image You can select a bank of cards together and change their shape data, such as Face Up, all in one go.


These playing cards were automatically laid out from the linked data recordset in the accompanying Visio document.


The alternative colors for the sight impaired can be displayed with the simple change of a page shape data value.


Now that I had a playing card shape that I am happy with, then I could start playing with how to use it!

So, I used the RAND() ShapeSheet function to generate a random number between 0 and 51, and then I converted this into one of the suit and values.

The formula for this action used on drop, if the DealOnDrop value is TRUE, and by the playing card right-mouse menu DEAL actions, is:


Then, when the value of User.RandowValue changes, the following formula converts the number into a suit and value index, and pushes these values into the relevant Shape Data rows:


These User-defined cell formulas provide the ability to drop a playing card with a randomly generated value onto the page, or I can use the Card Rack shape to automatically drop four cards, then insert more afterwards.


All I need now is to create a game with these cards … apart from Snap when the RAND() function provides the same card again!

The PlayingCards.vsdx Visio 2013 document is available from http://1drv.ms/1vkt0yv

Happy holidays….


3 Responses to “A Visio Deck of Cards”

  1. A Visio Countdown to Xmas | bVisual - a blog for people interested in Microsoft Visio Says:

    […] presented a Visio deck of cards in a previous post ( see https://blog.bvisual.net/2014/12/03/a-visio-deck-of-cards/ ), and now I present a real game that can be played with Visio over the holiday season. Countdown […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


O365 and SharePoint

Simplify Tasks

Want to learn the simple way?

Paul Turley's SQL Server BI Blog

sharing my experiences with the Microsoft data platform, SQL Server BI, Data Modeling, SSAS Design, Power Pivot, Power BI, SSRS Advanced Design, Power BI, Dashboards & Visualization since 2009

John Goldsmith's visLog

be smart, be clear, be visual ...

Mo's blog

Personal views on Dynamics 365 for Operations and Technical Architecture.

Chris Webb's BI Blog

Microsoft Power BI, Analysis Services, MDX, DAX, M, Power Pivot and Power Query


Azure Solutions for Office 365, and more...

Rob Fahrni



Life with Visio and other Microsoft Toys!

Nilsandrey's Weblog

Just another WordPress.com weblog

Things that Should be Easy

Every so often (too often in the IT industry) I encounter things that should have been very easy to do but turned out to be far too complicated. My favorite topics include SharePoint, .Net development, and software architecture, especially distributed systems.

Visio Guy

Smart graphics for visual people

%d bloggers like this: