Creating Custom Stencils and Custom Shapes in Microsoft Visio
Part one of a two-part series of blogs

One of the most time-consuming things in Microsoft Visio is continually formatting shapes in the same way every time you create a new diagram. If only you knew how to create a custom collection of shapes that you could reuse in every diagram you create… Read this article to find out how to do exactly that!

  1. Customising and Formatting Shapes in Microsoft Visio (this blog)
  2. Creating a Custom Stencil in Microsoft Visio

Posted by Andrew Gould on 15 June 2011

You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Customising and Formatting Shapes in Microsoft Visio

Formatting shapes in Microsoft Visio is a relatively easy thing to do, but it can be time-consuming.  This is especially true if you find yourself having to format shapes in the same way in each new diagram that you draw.  Wouldn't life be much easier if you could save a set of pre-formatted shapes that you can reuse in any future diagram?  Well, it's actually not all that difficult to do!

Our Example

For our example we're going to create a customised set of the basic flowchart shapes using Visio 2007 (although the techniques we're going to describe work equally well in Visio 2003).

Original flowchart shapes Customised Wise Owl flowchart shapes
These are the original (boring) flowchart shapes. These are our customised (exciting) Wise Owl flowchart shapes.

The starting point for creating our custom collection of shapes is a new flowchart diagram.  To create a new flowchart diagram, from the menu select:  File -> New -> Flowchart -> Basic Flowchart

Having done this you should be looking at a blank page and a list of standard stencils on the left hand side of the screen.  A stencil is simply a collection of shapes that you use to build a diagram.  We're going to use some of the existing shapes on the Basic Flowchart Shapes stencil as the basis for our custom shapes.

The Basic Flowchart Shapes stencil

You'll usually find that several stencils open automatically when you start a new diagram. The one we want is shown here.


Adding Shapes to the Diagram

Before we can start customising anything we need to add some of the basic shapes to the drawing page.  To do this you can simply use the mouse to click and drag a shape from the stencil and drop it on the drawing page.  We need the following shapes from the Basic Flowchart Shapes stencil added to the drawing page:

  •  1 Process shape
  • 1 Decision shape
  • 1 Terminator shape
  • 3 Dynamic Connector shapes

It doesn't really matter where they end up on the page, so drop them wherever you feel like for now.  You ought to end up with a drawing page that resembles the diagram shown below:


Try not to get the connectors stuck to each other when you drop them on the page.


Adding Text to Shapes

To make it easy to tell what our shapes are, and so that we can see the effects of the formatting we're about to apply, we're going to add some text to all but one of our shapes.  To do this you can simply click on a shape and start typing.  Click away from the shape when you've finished typing to confirm the text.  Use the diagram below as a guide to add text to each of your shapes, but leave one of the Connector shapes text-free.

Shapes with text

These are the six shapes we're most likely to use when we draw future flowcharts.


Formatting the First Shape

We're going to pick on the Process shape to apply our formatting effects to.  Once we've formatted this shape it will be remarkably quick and easy to copy the formatting to the other shapes.

Unformatted process shape Formatted process shape
We want to turn this... ...into this.

The starting point for formatting any object is to select it - click anywhere on the Process shape to select it.

Changing the Font Colour using RGB Values

The first formatting change we're going to make is to change the colour of the text in the shape.  Rather than just pick a random colour from a list of choices, we're going to be precise about exactly which colour we use.  To do this we're going to specify the RGB values of the colour we want.  RGB stands for Red, Green, Blue and is a common way to choose colours accurately in the world of Microsoft products.  To change the font colour of the selected shape, click the Text Color button on the toolbar, and then select More Text Colors...

Choosing more text colours

The Text Color tool is a common feature of Microsoft Office products. Make sure you click on the drop arrow to the right of the tool to see this list of choices.


When you've done this you should be looking at the Colors dialog box.  Click on the Custom tab at the top of the dialog box to see the RGB settings of the colour you want to choose.

Typing in RGB values

You can type numbers into the boxes labelled Red:, Green:, Blue: to specify the colour you want. The minimum number you can have in any box is 0 and the maximum is 255.


Click OK to select the colour whose RGB values you have typed in.  Helpfully, if you go back to the Text Color tool, you will see your recently used colours in a list at the bottom - hover the mouse over the colour to see its RGB values.

Seeing recently used colours

Even more helpfully, you can see the list of recently used colours whether you are choosing the font colour, line colour, or fill colour of a shape.


Using RGB values is probably the most common way to choose colours accurately in Microsoft Office products - if you look carefully you should be able to find the Colors dialog box in nearly every Office application.

Each of the three RGB settings has a minimum possible value of 0 and a maximum of 255, giving you a staggering 16,777,216 colours to choose from!

Formatting the Outline of a Shape

You can use the RGB method of choosing colours for everything that you want to format in Visio.  The next part of the Process shape we're going to change is its outline.  To change the colour of the line:

  1. Click the drop arrow next to the Line Color tool (you'll find it just to the right of the Text Color tool).
  2. Choose More Line Colors...
  3. Click the Custom tab at the top of the dialog box.
  4. Enter the following RGB values: Red 0, Green 130, Blue 195.
  5. Click OK

When you've done this, the outline of your shape should be a lovely shade of blue, Wise Owl Blue in fact!

Formatted text and outline

We're getting there. Slowly.


As well as changing the colour of the outline, we're also going to change the line weight, or thickness.  To do this, you simply need to click the Line Weight tool and choose an option from the list.

Choosing a line weight

If you don't like any of the options on display, click the More Line Weights option to see further choices.


The last thing we'll do with the outline of our shape is to round off the corners slightly.  We can't do this directly from the toolbar, we need to use a dialog box instead.  To see this dialog box, right-click on the shape and from the menu choose: Format -> Line...

Rounding the corners of a line

You can see the Round corners options at the bottom left of the dialog box. Click on the one you want and then click OK. Be a bit conservative with your choices or you might find that your rectangle becomes an oval!


While you have the Format Line dialog box open, you might want to consider choosing an arrow style for the Line ends options.  This won't matter for the Process shape as it's just a rectangle, but later we'll want to copy these formatting options to our arrow shapes.

Choosing line ends

These settings won't have any effect on the Process shape we are currently formatting, but it will save us time with our Connector shapes later on.


That's it for the outline of the shape.  The last remaining thing to format is the fill colour.

Text and line formatting complete

Nearly there, just the fill colour to go!


Changing the Fill Colour and Creating Fill Effects

It's easy to change the fill colour of a shape providing that you want a block fill.  You can simply click the Fill Color tool on the toolbar and choose a colour from the list of choices.

Choosing a fill colour

Changing the Fill Color is just like changing the colour of any other part of the shape.


We want to create a slightly more interesting gradient fill effect, where we see one colour fading into another across the shape.

Block fill Gradient fill
A block fill colour. A gradient fill effect.

To apply a gradient effect to a shape, right-click on it and then from the menu choose: Format -> Fill...

Choosing a colour gradient

When you've selected all of the options for the gradient, click OK to finish formatting your shape. 

Quickly Copying Formatting onto Other Shapes

Now that we've formatted our first shape, we need to replicate that formatting on all of the other shapes.  To do this we could select each shape in turn and laboriously apply all of the settings we've described in this article so far, or we could use the Format Painter to achieve the same effect in three clicks of the mouse!  To use the Format Painter:

  1. Select the shape whose formatting you want to copy.
  2. Click the Format Painter button on the toolbar (see the diagram below).
  3. Either click on one other shape to copy the formatting to it, or drag a selection box around all of the shapes you want to format.
The Format Painter tool

Make sure you select the shape first, and then click on the tool shown here to copy all of its formatting options.


You should find that all of the shapes are now formatted in the same way as the original one we formatted!  You might want to tweak a couple of things at this point, removing the rounded corners on the Decision shape for example, otherwise you can move on to the next article in this series to find out how to create custom stencil to add our shapes to.

The finished set of shapes

The finished set of custom shapes. The next step is to create a custom stencil to put them in!

  1. Customising and Formatting Shapes in Microsoft Visio (this blog)
  2. Creating a Custom Stencil in Microsoft Visio
This blog has 0 threads Add post