Visio Guy

Visio Discussions => Shapes & Templates => Topic started by: Michael on December 30, 2010, 02:08:06 PM

Title: Visio Shape Properties
Post by: Michael on December 30, 2010, 02:08:06 PM
I've been intrigued by the application/availability of VBA on Visio - I never even gave it a thought, to be honest but now it seems perfectly logical.

However - and there's always a "however" in this sort of thread - I've immediately come up against a roadbloack, and this concerns shape properties. Not the custom properties, but the basic, Visio ones such as defined in the style sheets.

What I was looking to do was see if I could run VBA on a set of diagrams and change, say, the background on "Processes", or the typeface on "Decisions", the line weight on "databases"...that sort of thing.

Is there a list of Visio shape properties available anywhere I can use as a reference?

Oh, and another matter (which I'll raise on the "bugs" thread as well.) How do I stop the "Cross-Functional flowchart"window popping up at the loading of some of my files (the ones I most use, as it happens - the big ones)?

Michael
Title: Re: Visio Shape Properties
Post by: Paul Herber on December 30, 2010, 02:56:39 PM
Download the Visio SDK for your version of Visio.
You'll find documentation for all these properties, you'll find that the document, each page, each shape, groups and each shape within a group has what is called a "shapesheet", a form of specialised spreadsheet containing sections, rows and cells. The SDK has loads of examples of how to manipulate this data.
Also have a look at John Marshall's site at http://visio.mvps.org/ (http://visio.mvps.org/). in particular the sections "VBA Information" and "Shapesheet Dev".
Title: Re: Visio Shape Properties
Post by: aledlund on December 30, 2010, 05:16:51 PM
and of course there's always this

http://msdn.microsoft.com/en-us/library/aa245244(office.10).aspx

al
Title: Re: Visio Shape Properties
Post by: Michael on January 04, 2011, 05:48:22 PM
Great! Thanks for the pointers. Have downloaded the SDK and skimmed over the websites mentioned. Got a few useful hints but don't (yet) want to get too carried away as I've got a lot of manual shape naming to do (sadly no way around that so far as I can see - all names are unique. 12 days solid work, based on what I've done so far...but should be well worth it).

Looks like there are quite a few shape properties I can use/name/define (e.g. - I was thinking of changing the fill colour/transparency/line weight & typeface of a Pre-Defined process if it has a hyperlink leading away from it, but I may be getting far too far ahead of my abilities at the moment... :) I'll try a few simple things first.)

Michael