Create custom shape or connector in PowerPoint using code/script/definition

2.1k views Asked by At

The shapes in in PowerPoint 2007 seem to be built in - is there a way to create 'user'/'custom' shapes?

I wanted to create a custom connector, but knowing if you can create a custom shape, could be handy in the future.

1

There are 1 answers

2
Todd Main On BEST ANSWER

There are several ways to do this, but not sure if they would meet your needs. If you need to have a custom shape added to the "insert shapes" drop-down and then place and size with your mouse cursor, then I know of no way to do this.

However, if you would like to define a custom shape and then programmatically add this to a location in your presentation, this is doable for sure. In VBA and VSTO, this is can be done via the Object Model; you can add a FreeForm shape, polylines, curves, etc. and in some cases group these to form a single shape. I've done as much with a series of 9-pointed stars that I needed on a regular basis.

To create a custom shape/connector in Drawing ML also appears possible. It is not something I've tried yet, but it certainly looks as if it can be done. There are a number of calculations you would need for this that are well documented in the Ecma specs. By "well documented", I don't mean "easy" though - all of the formulas can be complex. In the case of the connector, it looks as if you would need to programmatically change the shapes your connector is connecting to though to your custom connector (shapes identify their connector, if they have one).