David's profilebVisualPhotosBlogListsMore Tools Help

bVisual

be smart, be clear, be visual!

David Parker

Occupation
Location
Interests
Building architect turned software application developer
Do unto others as you would have others do unto you

Visio Insights

Loading...Loading...
May 22

Using MailTo Protocol in Visio Shapes

A newsgroup question asked whether you can send an email from a Visio shape, so I thought it was time to document an example of just that..

In this example, I have added four Shape Data rows for the Address, Subject, CC and BCC fields…

image

However, I have used the Screen Tip cell for the message body because it is the only out-of-the-box dialog that allows you to enter multi-line text into a Shape Cell.

image

To open the Screen Tip via the right mouse menu, I added the formula =DOCMD(1685) to an Actions row.

To force the Hyperlink.Address cell of the new Hyperlink.Mail row to update whenever any of the values in the four Shape Data rows or the Screen Tip is changed, I added the following formula to a new User-defined cell called, MailToTrigger:

=DEPENDSON(Prop.Address,Prop.Subject,Prop.CC,Prop.BCC,Comment)+SETF(GetRef(Hyperlink.Mail.Address),"=""MailTo:"&Prop.Address&"?Subject="&Prop.Subject&"&CC="&Prop.CC&"&BCC="&Prop.BCC&"&Body="&Comment&"""")

That’s it! Just enter email addresses, a subject and body, then your mail client will be opened pre-filled from the right-mouse menu of the VIsio shape, or, of course, from a SaveAs web page.

You can read about the MailTo protocol here: http://msdn.microsoft.com/en-us/library/aa767737.aspx

May 16

Old Trafford in Deep Zoom

Sometimes in life you get opportunities that you just have to take …. and one just came to this old Manchester United supporter … a chance to watch my team play from a corporate box against Arsenal … and I could take my son, Krysh, too!  We only needed a draw to win the Premier League (again) … and a draw is what we got! Like an earlier post, I took lots of photos and patched them together using Microsoft Image Composite Editor.  I love that tool!

Just in case you have never heard of Old Trafford .. it is in Manchester, England … just here:

Map picture

 

I last went to Old Trafford over 20 years ago … it didn’t look like this then …  this is the East Stand.

image

Here is the Deep Zoom version : Old Trafford East Stand

image

Here is the Deep Zoom version : Old Trafford Pre Kick Off

image

Here is the Deep Zoom version : During the match

The match was 0-0, but that was enough to be presented with the Barclay’s Premier League title for the 3rd consecutive year … that’s 18 in total!

ManUtdChampions2009

Thank you to everyone who made it such a great day!

OldTraffordBox 

(PS : You missed a great day, Tim)

May 12

An Interview on TechNet about Visio

I was interviewed by Microsoft when I was at the MVP conference in March. I rambled on about some of my experiences with Visio over the years.  It has now been published for all to see at http://edge.technet.com/Media/Visio-Drawing-on-Experience-with-David-Parker/ 

image

In case you are wondering, the shirt was from the 1998 Visio Conference, which was pre-Microsoft.  It’s probably time that I had a new wardrobe!

Seattle Trip May 2009

I went to see the latest version of Visio last week at Microsoft Campus in Redmond, but, as usual, chose to stay in Seattle because it is such a great city.  I love to walk down to Pike Place market in the morning to ponder over which specialist food to select, or to smell the flowers as they are arranged for the day’s pickings.  So, with a piroshky (Russian pastry) and coffee I strolled to the little park at the end to contemplate the day.  The view across Puget Sound is fantastic and I wanted to capture it to share with my friends.  I only have a handy little digital camera, but fortunately, I recently became aware of a handy little application called Microsoft Image Composite Editor (http://research.microsoft.com/en-us/um/redmond/groups/ivm/ICE/ ) .  MICE patches your photos together to make a larger panorama, and then you can export it into many different formats.

I have saved four panoramas for viewing using Deep Zoom in Silverlight 2.

Seattle Trip May 2009
Seattle Trip May 2009

I have shared the collection on Live Maps (I think this only works if you are signed in): http://maps.live.com/default.aspx?v=2&FORM=LMLTCC&cp=47.577559~-122.091288&style=r&lvl=11&tilt=-90&dir=0&alt=-1000&phx=0&phy=0&phscl=1&cid=3350D61BC93733A9!1505&encType=1

I have also used the 3D Map Tour feature in Live Maps to create a short movie showing the location of the panorama positions:

 
3D tour of panorama placemarks

 

Victor Steinbrueck Park

I didn’t know the name of the little park at the end of Pike Place until I looked it up on Live Maps

VictorSteinbrueckPark

View the panorama here : http://www.bvisual.net/views/VictorSteinbrueckPark.html

The Moore Hotel

As far as I know, this is the only listed hotel in Seattle.

TheMooreHotel

View the panorama here : http://www.bvisual.net/views/TheMooreHotel.html

Snoqualmie Falls

After visiting two wineries on Saturday, I eventually made it to the waterfall that is 100ft higher than Niagara, and featured in David Lynch’s Twin Peaks.

SnoqualmieFalls

View the panorama here : http://www.bvisual.net/views/TheFalls.html

Yellow Lake, Sammamish

I visited my friend Richard Smith and his lovely family out in Sammamish and went for a walk around their local lake.

YellowLake

View the panorama here : http://www.bvisual.net/views/YellowLake.html

April 30

celMaker 2 (part 2)

My last post was only yesterday, when I released celMaker 2 for Visio 2007 and Excel 2007, but I have already had some feedback from my fellow Visio MVP, John Goldsmith.  He found a couple of “bugs” and suggested an improvement, so they have all been implemented.

Installation

The installation from the web site should be straight forward … if you press the launch link, rather than the install button.

image

The installation adds celMaker2 to your programs under bVisual.

image

You can uninstall using Control Panel.

Note that celMaker2 will automatically check for any updates whenever it is started.

Format as Table option

John suggested that it would be nice to automatically format the data as a table in Excel.

image

So, this option does just that, which means that the headers stay visible, even when scrolled.

image  

Bug Fixes

1. One too many Invisible and Disabled columns

If you used celMaker 2 in the last 24 hours, then you will find Invisible2 and Disabled3 columns … simply delete them

2. Reading Multiple Masters with precedent cells

This resulted in an error because the processing got confused … now fixed

3. Unnamed Connection Point Rows

These were being ignored … now fixed

Please feel free to email me, davidp at bvisual.net with any comments .. they are disabled in this blog because I was getting a lot of Chinese spam.

April 29

Introducing celMaker 2

I was recently asked to provide a  new version of celMaker that works with Visio 2007 and Excel 2007, so I got my old VB6 code out of SourceSafe and upgraded it so that I could run it on my Vista 64 laptop too.  I also decided that I would release this version to the public as freeware because I have added no new features.So, what is celMaker? And where can you download it?

Last one first … you can download it from here : http://www.bvisual.net/products/celMaker/publish.htm

Most Visio users will have the components, so you can just click the Launch link.

1. Introduction

celMaker is a developer(ish) tool for Visio which allows the most often used sections of a Visio ShapeSheet to be copied into an Excel spreadsheet, or from an Excel spreadsheet onto a Visio master.
This means that the Visio Shape designer can create one master with its Shape Data (nee Custom  Properties), User Cells, Actions, Smart Tags, Controls and Connection Points, and then save this to an Excel spreadsheet for backup, verification, discussions, documentation or transfer to another Master.
The Excel spreadsheet can be created manually or by reverse engineering existing Visio masters.
celMaker is provided as a stand alone executable that requires both Visio and Excel to be running, and can be used for many different types of diagram projects.

2. Direction

2.1 From Excel to Visio

This will forward engineer a suitable Excel worksheet to selected Visio Masters.

image

2.1.1 Remove all existing cells first

If checked, will remove all cells for the selected ShapeSheet sections on the master, before adding any.

2.1.2 Match Master name

If checked, will only process changes from the spreadsheet to the master if the master names match.

2.1.3 Avoid Reserved words

If checked, will not process any custom properties with the following reserved names:

  • Name
  • OpRisk
  • AvailOpt
  • ActualOpt
  • ActualDiscrete
  • RedundancyOpRisk
  • AvailDiscrete
  • IsTemplate

You can edit this list on the Settings tab.

2.2 From Visio to Excel

This will reverse engineer selected Visio Masters into a formatted Excel worksheet.

image

2.2.1 Insert Header

If checked, will create the headers row in the Excel spreadsheet.

2.2.2 Insert at end

If checked, will preserve any existing rows in the selected Excel spreadsheet, by adding new ones at the end.

3. Excel

Select an open Excel workbook (document) from the upper list box, and then the worksheets will be listed in the lower one.

image

Select a single worksheet in the lower list box.

3.1 Refresh

Click this button to refresh the list of open Excel documents and worksheets

4. Visio

The Open Visio Documents panel only lists editable documents. If you want to copy from a Master on a read-only stencil, then just drag and drop it onto an editable document.

Select an open Visio document in the upper list box, then its Masters will be listed in the lower one.

image

You must select one or more Visio Masters of an open Visio document.

4.1 Refresh

Click this button to refresh the list of open Visio documents and Masters

5. Sections

This tab allows the required sections to be selected for forward or reverse engineering.

image

6. Settings

This tab enables you to edit the reserved words or check the column headers.

image

7. Close

Closes celMaker

8. Help

Opens a pdf of this file

9. About

Opens the About dialog (and a shameless plug for my book!).

image

10. Apply

The Apply button becomes enabled when you have selected both an Excel worksheet and a Visio Master.

10.1 From Visio to Excel

If the Direction select is Visio to Excel, then you will be prompted to confirm the copy operation.

image 

Here is the Server Master whose cells are being copied in the following example:

image

The selected section’s cells are copied to the selected Excel worksheet:

image

10.2 From Excel to Visio

You need to select an editable Master to copy the cells to from a worksheet.

image

You will be prompted to continue.

image

After processing, the Master will have all of the ShapeSheet sections that you have in your worksheet.

image 

10.3 Excel Worksheet Columns

If you reverse engineer Visio cells to Excel then a row will be created in the worksheet for every cell in Visio. The source Master and Master prompt will be listed in the first two columns, with the Section and Cell name or number in the third and fourth columns.

Worksheet Column

Visio element

Comment

Section

A

Master

The name of the Master that was reverse engineered. (ignored for forward engineering – to Visio)

All

B

MasterPrompt

The prompt for the master

All

C Shape This is either the name of the shape in the Master, or it is Sheet.0, which means it is the Master Page Al

D

Section

The Visio ShapeSheet section name – Prop, User, Action. SmartTag, Controls or Connections

All

E

CellName

The hidden name of the cell.

All

F

Value

Any default value for the property or for the user-defined cell, for example.

All

G

SolutionXML

Valid Solution XML statement to be added to the property. (Reserved for future use)

Prop User and Connections

H

Prompt (Tip)

The long description of the property

Prop, User, Connections, Controls

I

Label

The displayed name of the property or user-defined cell.

Prop

J

Type

Must be, or evaluate to, a number from 0 to 7:

0=Text, 1=Fixed List, 2=Number, 3=Boolean, 4=Variable List, 5=Date, 6=Duration, 7=Currency

Prop, Connections

K

Format

Must be a valid format for the Type. For example, if Type = 1 or 4, then the Format should be a semi-colon separated list. Default is 0.

Prop

L

SortKey

Used for alpha sorting of properties in the normal custom properties window or dialogue,

Prop

M

Invisible

Must be, or evaluate to, 0 or 1, which will show or hide the property. Default is 0

Prop

N

Verify (Ask)

Must be, or evaluate to, 1 or 0, which will prompt or not for the property when a new master instance is created. Default is 0.

Prop

O

LangID

Valid language ID

Prop

P

Calendar

Valid non-western calendar

Prop

Q

Action

The action to do, expressed as a valid ShapeSheet formula.

Actions

R

Menu

The displayed menu text for the action.

Actions

S

TagName

Associates SmartTag actions to SmartTags

Actions, SmartTags

T

ButtonFace

Must be a valid Microsoft Office button face ID (0 to approx. 7000),or empty

Actions, SmartTags

U

Checked

Must be, or evaluate to, 1 or 0, which will check or uncheck the menu item. Default is 0.

Actions

V

Disabled

Must be, or evaluate to, 1 or 0, which will enable or disable the menu item. Default is 0.

Actions

W

ReadOnly

Must evaluate to 0 or 1

Actions

X

Invisible

Must evaluate to 0 or 1

Prop

Y

BeginGroup

Must evaluate to 0 or 1

Actions

Z

X

The X position of the Connection Point or Control

Connections, Controls,

Scratch

AA

Y

The Y position of the Connection Point or Control

Connections, Controls,

Scratch

AB

DirX

The X direction of the Connection Point

Connections

AC

DirY

The Y direction of the Connection Point

Connections

AD

XJustify

Must be 0 = left, 1 = center, or 2 = right.

SmartTags

AE

YJustify

Must be 0 = top, 1 = middle, or 2 = bottom

SmartTags

AF

DisplayMode

Must be 0 = Mouse Over, 1 = Shape Selected, or 2 = Always

SmartTags

AG

Description

Any text

SmartTags

AH

Disabled

Must evaluate to 0 or 1

SmartTags

AI A Reserved for future use

Scratch

AJ B Reserved for future use

Scratch

AK C Reserved for future use

Scratch

AL D Reserved for future use

Scratch

AM AutoGen A value of 1 indicates that the connection point is generated automatically

Connections

AN XDyn X coordinate of the control Controls
AO YDyn Y coordinate of the control Controls
AP XCon (XBehavior) X behavior of the control Controls
AQ YCon (YBehavior) Y behavior of the control Controls
AR CanGlue Determines if the control handle can be glued Controls

 

See Microsoft Office Visio 2007 SDK Documentation for more information on these elements.

http://www.microsoft.com/downloads/details.aspx?FamilyID=772ccdd1-7d06-4cc4-8ecd-de5864428c26&DisplayLang=en 

10.4 Processing has Finished

Once you have finished an operation, you will be prompted to close celMaker, or not.

image

April 25

Impending SP2 for Visio 2007

All programs have bugs, but some bugs are more annoying than others.  One such bug is the often missing ribbon UI in Excel when you generate a report from Visio.  So, I was delighted when the Visio team informed me of the impending service pack 2 for Microsoft Office Visio 2007, and found that it includes a fix for this problem: ttp://blogs.technet.com/office_sustained_engineering/archive/2009/04/16/service-pack-2-for-the-2007-microsoft-office-system-due-to-ship-april-28th.aspx

So, what is this bug?  Well, I often run reports straight from Visio using the rudimentary report writer:

image

Unfortunately, Visio 2007 sometimes gets upset that it did not get the Ribbon UI like Excel, Word and PowePoint, so decides that Excel should not have it also:

image 

Well, now that it has been announced that the next version of Visio will get the Ribbon, now called the Fluent UI, Visio will allow Excel to keep it’s Ribbon too!

image

One of other fixes that stands out as overdue, is the crashing caused by the Bluetooth Add-on … that will please a lot of users!

I will be installing this service pack as soon as I can….

April 17

Visio in XPS and Interesting Microsoft Office Labs Projects

For the past two years, I have been adding XAML-based projects to my collection, alongside the normal Visio libraries and automation code that I normally produce.  The reason is quite simple : both environments have the ability of linking vector graphics and data together in an exciting, interactive and controllable way.  There is a certain smartness to both with the ability to binding data to graphical appearance.  XAML seems to be present in all of Microsoft’s graphic products, in the form of WPF, Silverlight .and Xps.  Now, we know that there are great things to come viz-a-viz Visio and XAML in the next version, and there is Saveen Reddy,s excellent Visio Export to XAML project on CodePlex (http://visioexporttoxaml.codeplex.com/), but most people do not realise that Xps is XAML, but compressed.

So, if you have Visio 2007, then you can save a document in Xps format ( see http://office.microsoft.com/en-gb/visio/HA100649931033.aspx).

image

This should open in your browser, like this:

image

However, Microsoft have a standalone Xps viewer available for free download as part of the Xps Essentials Pack ( http://blogs.msdn.com/xps/ ).

The XPS Viewer EP includes a thumbnail viewer, which will create an interactive canvas, in which you can select which page to zoom into.

image

The Xps Viewer EP also includes a document outliner, but this reveals a bug in the Xps file exported from Visio when you click on a page.

image

Fortunately, it is possible to fix this error.

image

The error can be traced to the Documents\1\Structure\DocStructure.struct file:

<DocumentStructure
xmlns="
http://schemas.microsoft.com/xps/2005/06/documentstructure">
<DocumentStructure.Outline>
  <DocumentOutline xml:lang="en-US">
   <OutlineEntry OutlineLevel="1" Description="NetworkTopology.vsd"  OutlineTarget="../FixedDoc.fdoc#1"/>
   <OutlineEntry OutlineLevel="2" Description="Topology"  OutlineTarget="../FixedDoc.fdoc#1"/>
   <OutlineEntry OutlineLevel="2" Description="Row 1 Rack 1"  OutlineTarget="../FixedDoc.fdoc#2"/>
   <OutlineEntry OutlineLevel="2" Description="Row 1 Rack 2"  OutlineTarget="../FixedDoc.fdoc#3"/>
  </DocumentOutline>
</DocumentStructure.Outline>
<Story StoryName="MainStory">
  <StoryFragmentReference Page="1"/>
  <StoryFragmentReference Page="2"/>
  <StoryFragmentReference Page="3"/>
</Story>
</DocumentStructure>

which should become:


<DocumentStructure xmlns="
http://schemas.microsoft.com/xps/2005/06/documentstructure" xmlns:c="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:b="http://schemas.bvisual.net/xps/" c:Ignorable="b">
<DocumentStructure.Outline>
  <DocumentOutline xml:lang="en-US">
   <OutlineEntry OutlineLevel="1" Description="NetworkTopology.vsd" OutlineTarget="../FixedDoc.fdoc#PG_0" />
   <OutlineEntry OutlineLevel="2" Description="Topology" OutlineTarget="../FixedDoc.fdoc#PG_0" />
   <OutlineEntry OutlineLevel="2" Description="Row 1 Rack 1" OutlineTarget="../FixedDoc.fdoc#PG_4" />
   <OutlineEntry OutlineLevel="2" Description="Row 1 Rack 2" OutlineTarget="../FixedDoc.fdoc#PG_5" />
  </DocumentOutline>
</DocumentStructure.Outline>
<Story StoryName="MainStory">
  <StoryFragmentReference Page="1" />
  <StoryFragmentReference Page="2" />
  <StoryFragmentReference Page="3" />
</Story>
</DocumentStructure>

Note the amended OutlineTarget attributes

… and to the Documents\1\FixedDoc.fdoc file:

<FixedDocument xmlns="http://schemas.microsoft.com/xps/2005/06">
<PageContent Source="Pages/1.fpage"></PageContent>
<PageContent Source="Pages/2.fpage"></PageContent>
<PageContent Source="Pages/3.fpage"></PageContent>
</FixedDocument>

should become :


<FixedDocument xmlns="
http://schemas.microsoft.com/xps/2005/06">
<PageContent Source="Pages/1.fpage" Width="1124" Height="795">
<PageContent.LinkTargets><LinkTarget Name="PG_0" /></PageContent.LinkTargets></PageContent>
<PageContent Source="Pages/2.fpage" Width="1124" Height="795">
<PageContent.LinkTargets><LinkTarget Name="PG_4" /></PageContent.LinkTargets></PageContent>
<PageContent Source="Pages/3.fpage" Width="1124" Height="795">
<PageContent.LinkTargets><LinkTarget Name="PG_5" /></PageContent.LinkTargets></PageContent>
</FixedDocument>

Note the added LinkTarget elements.

It is possible to go further, and to include significant shapes as named XAML elements in the XPS file, which means that you can expand the pages in the XPS viewer to list the shapes:

image

In fact, you can encapsulate the shape data (custom properties) as hidden elements in the Xps document, so that you could have your own viewer (say, WPF or Silverlight) that accesses the hidden elements.

In this way, Xps documents can become portable data diagrams, and they can be ready to print … unlike the Save As Web from Visio.

Now, the reason why I got back on to this subject recently was some great add-ons for OneNote and PowerPoint which (I think) use Xps in a manner similar to the Xps Viewer:

Canvas for OneNote - http://www.officelabs.com/projects/canvasforonenote/Pages/default.aspx

pptPlex - http://www.officelabs.com/projects/pptPlex/Pages/default.aspx

So, this is a public call for Microsoft Office Labs to consider a similar tool for Visio!  It would be really cool … and useful!

March 12

Let us show you how – Visio 2007 Webcasts

I have been asked to advertise this series of webcasts by Microsoft … looks like I’ve missed the first one!

clip_image001

clip_image002clip_image003clip_image004

 

IT Management, Process Management, HR Management... and lots more

Microsoft Office Visio 2007 makes it easy for IT and business professionals to visualize, explore, and communicate complex information. Go from complicated text and tables that are hard to understand to Visio diagrams that communicate information at a glance. Instead of static pictures, create data-connected Visio diagrams that display data, are easy to refresh, and dramatically increase your productivity. Use the wide variety of diagrams in Office Visio 2007 to understand, act on, and share information about organizational systems, resources, and processes throughout your enterprise.

clip_image005

Over the next six weeks, let Microsoft walk you through everything from the basic overview of Visio 2007 through to specialist application in various job roles like HR or Business Process

Overview of Office Visio 2007

12 March 16:00 GMT – 45 minutes – Register Now

o Understand the key concepts of Visio

o Understand the templates available within Visio

o Create drawings

o Use useful shortcuts and tips

o Be able to create basic diagrams at the end of the session

Getting started with Visio 2007 – Hints and Tips on How to Create a Visio Diagram

17 March 11:00 GMT – 45 minutes – Register Now

o Drag and Drop Diagramming with Shapes

o Touring the Visio Window

o Finding the Information you need

o Adding Shapes to a Diagram

o Finding the Shape you want

o Understanding Control Handles

o Laying out shapes on the page

o Selecting Shapes

o Using Connectors and the Connector Tool

o Adding Text to Shapes and Diagrams

Advanced Features in Visio 2007

26 March 16:00 GMT – 45 minutes – Register Now

o Understand the things that take up time and improve performance

o Look at how to enhance diagrams

o Work effectively with some of the additional tools

Visio for HR – Creation of Organisation Charts

16 April 11:00 GMT – 30 minutes – Register Now

o Create a basic organisation chart

o Work with the organisational chart wizard

o Work with Themes for organisation chart

o Take your organisational charts into other Applications (Word, Powerpoint etc)

o Create Drill downs to see different levels of the chart

o Add photographs to your chart

o Enhance your charts to maximize appearance

Process Mapping in Visio 2007

21 April 16:00 GMT – 45 minutes – Register Now

o The different process maps available to you

o Work with the templates provided in Visio 2007

o Creating some charts

o Working efficiently with your diagrams so that edits are minimal

o Creating Drill downs on your chart

o Working with the new flowchart converter in 2007

Visio for Office Space Planning

30 April 11:00 GMT – 30 minutes – Register Now

o Understanding the basics of Floorplans

o Using the templates

o Constructing a floorplans

o Working with Layers

o Using shortcuts to work quickly and efficiently with the floorplan

clip_image006

clip_image007

February 24

Creating an Org Chart without the Org Chart Wizard

Microsoft Office Visio has had an Org Chart Wizard for as long as I can remember (and I have been using Visio since 1996).  It has gone through several iterations, but basically it provides a simple way to create personnel hierarchies from a variety of data sources.  It even has a command line interface so that the charts can be created with a minimum of user interaction.  This is great, but it is limited.  Firstly, it does not take advantage of the new Link Data to Shapes and Data Graphics in Visio 207 Professional; secondly, it only does direct reports with just one type of layout; and thirdly, you cannot refresh the diagram easily.  Therefore, I thought it would be interesting to overcome some of these obstacles using the new features of Visio 2007 Professional and with a little code.

Visio installs a sample OrgData.xls Excel spreadsheet in the folder <Program Files>\Microsoft Office\Office12\SAMPLES\1033 by default, so I have copied this file and slightly amended it.

image

There are plenty resources on the web to help you use the built-in Org Chart Wizard in Visio, for example : http://office.microsoft.com/en-us/visio/HA011822551033.aspx.  If you follow these in instructions, then you can produce a chart similar to the one shown below.  I have used Color By Value to automatically fill the shapes with different colors by Department.

image

Applying more than the Color By Value Data Graphic can be problematical because these shapes are rigorously controlled by the OrgChart addon, and I have often seen questions about modifying the appearance or layout in the newsgroups.  Customization is also complicated by the fact that there are many master shapes in the stencil, each of which can be changed to look like one of the other.  For example, an Executive can become a Consultant, or a Position can become a Manager.  This is done with the Change Position Type tool, but this does not magically swap one shape for another, but it just changes a property that changes the shapes appearance.  You may think that this is not a problem, except that any customization requires that it be done to all of the master shapes, not just one.

I slightly modified the spreadsheet to insert “mailto:” before the email address.  This will enable Link Data to Shapes to automatically understand that it is a hyperlink and create one on each shape.

image

I used Link Data to Shapes to a display the spreadsheet in an External Data Window in Visio.  Then I simply drew an ellipse and modified its fill, line and shading before dragging one of the records onto it.

image

Once there is some data on the shape, you can use the Data Graphics in Visio 2007 Professional.  I linked the Department to Color By Value again; Master_Shape to the built-in face icons, the Office_Number to a circle at the bottom, and Title, Name and Department as three lines of text in the center of the shape.  The MailTo values automatically create an hyperlink on each shape, as hoped.

image

After showing the Document Stencil, I dragged the shape onto it, and named the new Master as Person.

You can then use this Person master to drag and drop the records from the External Data Window onto the Visio page.  Interesting, but not a very pretty organization chart.

image

Now comes the clever(ish) bit.  The data recordset in the External Data Window is accessible by code.  Therefore, you can loop through the records, get the employee name, then check which other employees report to this employee.   Having got the sub-ordinate employees, you can add a connector between them.

Just for good measure, I take the opportunity to name the shapes, as I loop through them.  This makes the Drawing Explorer Window usable.

The download includes the ConnectSubordinates sub routine in the ConnectShapes module with its support functions, getColumnIndexByName; and IsArrayAllocated.

So, now we have a connected diagram.  Not very pretty, yet, but it is connected.

image

You can manually use Shape / Configure Layout to alter the appearance of the chart

image

Alternatively, you can automate the layout with code.  I have included macros in the LayoutShapes module for changing the appearance in the download, for example, LayoutPageCircular creates a diagram like this:

image

Or LayoutPageCompactTree and LayoutPageRadial creates diagrams like these:

image image

 

You can now choose the type of chart to suit your requirements, and, of course, Visio will automatically optimize the layout if you add in extra matrix reporting.

I have included a short macro, DeleteConnectors, so that the links can be recreated when the data is refreshed. Of course, all of this can be fully automated, along with publishing to the web, PDF or Xps.

The sample files can be downloaded from here:

http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/LinkDataOrgChart.vsd

http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/ORGDATA.XLS

 
Photo 1 of 58
Thanks for visiting!
Please wait...
Sorry, the comment you entered is too long. Please shorten it.
You didn't enter anything. Please try again.
Sorry, we can't add your comment right now. Please try again later.
To add a comment, you need permission from your parent. Ask for permission
Your parent has turned off comments.
Sorry, we can't delete your comment right now. Please try again later.
You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
Complete the security check below to finish leaving your comment.
The characters you type in the security check must match the characters in the picture or audio.