I reader of one of my earlier posts, Copy Data from one Shape to Another ( see http://davidjpp.wordpress.com/2009/02/02/copying-data-from-one-shape-to-another/ ) asked how a cow can inherit the field number of from the field that it in. I think that this is just an example of how you can automatically update any Shape Data value from an underlying container, but I will use a cow in a field example anyway. This example uses VBA code, but should be good to use in any version of Visio since Visio 2000.
Visio
How to Run VBA Macros from a Ribbon Button in Visio 2010
A colleague, who is an experienced Visio tutor, asked me how to hook VBA macros to the Fluent UI Ribbon. He figured that it must\should be easy, but he can’t see where it is done. Well, this question has resonance because a plea was made to the Microsoft Visio team at our recent MVP Conference that this often asked for feature should be made easy for the macro developer. Now, I must admit that I have been so busy writing .Net Visio Add-Ins and following the pattern for the Fluent UI in VSTO C# code, that I had not appreciated just how convoluted the calling of VBA from a Ribbon button is. So, I thought I would offer a way of doing this in a simple (I hope!) way.
I will show how this can be done for a Visio drawing or template that contains VBA macros, and how this can be also be used for a Visio stencil that contains the code. I know that some macro developers put their code into drawings, but I would always recommend putting the code into a stencil, if the code is to be used by multiple drawings.
The Visio team’s Insight Blog has some useful background at http://blogs.msdn.com/b/visio/archive/2010/02/24/user-interface-extensibility-in-visio-2010.aspx , but it only has one fleeting mention of VBA macros:
For VBA, you simply provide the contents of a RibbonX XML as a string directly to Visio through the CustomUI property.
So, what does that mean? How do you actually do it?
Well, there is some sample code in the Visio 2016 SDK.

Another Dot Grid …
My good friend, John Goldsmith, recently published a blog about how to create a printable dot grid in Visio (see http://visualsignals.typepad.co.uk/vislog/2011/02/dot-grid-backgrounds.html#more ). This inspired me to share another way that you can create a dot grid in Visio. This time I will use a custom fill pattern, rather than new shape. This has the advantage that the fill pattern can be applied to any shape, and will repeat the pattern as much as is required to completely cover the shape.
In the following example, I have just drawn a rectangle, and applied a new custom Fill Pattern, called Grid.

To create this pattern, just open the Drawing Explorer then select New Pattern from the right mouse action. Name the pattern, ensure that the Scaled option is ticked, and that the behaviour is set to the first option (repeat).
[Read more…] about Another Dot Grid …Using Character Map Symbols as Data Graphic Icons
I attended the ninth DDD on Saturday (see http://developerdeveloperdeveloper.com/ ), and, as usual, there were many interesting presentations. Sam Bourton extolled the virtues of Microsoft Expression Blend for WPF and Silverlight developers (NOT designers note!), and he showed a neat trick to create icons quickly by using Wingding symbols. Basically, he created a text block in Blend, inserted a symbol from one of the three Wingding fonts character maps, then converted the symbol to a path. It struck me that we could do a similar trick in Visio to create Data Graphic Icon Sets cheaply … so here goes…..
In this example, I am using a Process shape from the Basic Flowchart stencil because it has a Status Shape Data row that is defined as a choice from six different values (the first value is an empty text string).

Choice of Values for Status Shape Data row
[Read more…] about Using Character Map Symbols as Data Graphic IconsCongrats to another Visio chap in the UK
Those of you who use the Microsoft Office and TechNet Forums may have noticed that I don’t answer too many questions there. Firstly, this is because I am normally beaten to it by John Marshall (Canada), Al Edlund (USA), or Paul Herber (UK). Well, the first two are Microsoft MVP’s for Visio (like me), but Paul has just achieved something that most MVP’s have not … he has been awarded a second medal for his activity on the Visio forums (John Marshall was the first I believe). So, congratulations to Paul!
The second reason is that I just don’t find them as easy to use as the old newsgroups that Microsoft used to host. I know that there were good reasons for the transition, but I look forward to them being improved – and Visio getting it’s own forum, rather than just being a filter on other Office products!
The Visio forums can be found at:
Microsoft Office for Business Users: Visio, Project, InfoPath, and Access : http://social.answers.microsoft.com/Forums/en-US/addbuz/threads?filter=alltypes%2cmf%3aa094743e-91c5-4bb1-a29f-87fdc36790ce
Visio General Questions and Answers for IT Professionals : http://social.technet.microsoft.com/Forums/en-US/visiogeneral/threads
Paul Herber has just started a Visio blog too : http://www.paulherber.co.uk/articles/visio-articles/
Microsoft Monday at Packt Publishing
My latest book, which is about validating diagrams in Visio 2010 ( https://www.packtpub.com/microsoft-visio-2010-business-process-diagramming/book ) was published by Packt Publishing last year.
You can get 25% off during January, if you buy more than one Microsoft book from them. Please read the details at https://www.packtpub.com/article/microsoft-books .