Insert custom smartart programmatically
If you have download additionaly smartarts from Office.com or other sources and wondering how to insert them programmatically into your deck then it is not too difficult.
First double-check that the custom GLOX file is located in the %appdata%\Microsoft\Templates\SmartArt Graphics folder. This ensures that the smartart appears in the PowerPoint UI as well as in the smartart layout collection in the object model. The example below retrieves my custom smartart - Dotted List and inserts it into the slide.
Supported versions: PowerPoint 2010+
' -------------------------------------------------------------------------------- ' Copyright ©1999-2018, Shyam Pillai, All Rights Reserved. ' -------------------------------------------------------------------------------- ' You are free to use this code within your own applications, add-ins, ' documents etc but you are expressly forbidden from selling or ' otherwise distributing this source code without prior consent. ' This includes both posting free demo projects made from this ' code as well as reproducing the code in text or html format. ' ------------------------------------------------------------------------------- |
Copyright 1999-2018 (c) Shyam Pillai. All rights reserved.