Possible to turn off lines for PowerPoint SmartArt GroupItems in VBA?

This is weird. Almost looking like a Microsoft bug!

I'm getting some unexplainable behaviour when programmatically formatting SmartArt.

If I insert the Segmented Process SmartArt into a default Office themed deck, I see the following (in slideshow):

SmartArt-lines-VBA-1.png
Now, it's a bit difficult to see but the lighter rectangles have outlines which I need to turn off which I can do via the PowerPoint UI to get this:

SmartArt-lines-VBA-2.png
But If I select the SmartArt object and use the immediate window to try to access the lines, I get a load of inconsistent behaviour ranging from:

1. Runtime errors (which I can't reproduce to write here)
2. Nothing happening
3. Lines changing colour to black as per this example:

SmartArt-lines-VBA-3.png
Tell me this isn't a bug! Is there any way to set lines to "none" because the workarounds I tried lead to a second suspect bug whereby both setting weight to 0 or transparency to 1, does not yield the same visual result as line = none (via the UI)?
LVL 14
Jamie GarrochPowerPoint Consultant & DeveloperAsked:
Who is Participating?
 
Jamie GarrochPowerPoint Consultant & DeveloperAuthor Commented:
I conclude that there is no solution to this question.
0
 
regmigrantCommented:
I'm not 100% confident here because its an area I've not worked with but I tried manipulating the smartArt shapes in Excel with Macro recorder on and it ignores everything done to the shape once its selected. This usually means the object model has not been fully exposed to VBA (based on previous experience) - which is borne out by a few googled pages.
Apparently the Smart Art shapes are recorded as xml in a 'glox' file which can be manipulated directly but its not easy to manage in VBA.

https://msdn.microsoft.com/en-us/library/office/gg583880(v=office.14).aspx
0
 
Jamie GarrochPowerPoint Consultant & DeveloperAuthor Commented:
Thanks regmigrant. I looked into the GLOX file definitions for SmartArt and ran into a problem there too. It appears that in the open DrawingML standard, there is no setting for "none" as far as lines are concerned. That kind of makes sense because why would you define a line and then want it to be invisible! So, it doesn't look like it's going to be possible to turn off lines using any programming method without Microsoft changing something.
0
 
regmigrantCommented:
Based on what I've found so far I think you are correct.
The idea of creating an invisible line is actually useful for typesetting and web design - and Powerpoint is great at doing it on the sly and then tripping you up with it (try creating a text box and leaving a space in it, then its impossible to find again until you try and move something and PPT decides you want to align to the invisible box).

It's interesting that they use 'none' in the GUI, I'm guessing that actually gets translated into several different values to populate multiple properties according to some internal MS XLSD that's not yet been opened up either because a) they bought it in and some bits are proprietary b) its broken and they have stitched it together just enough to get it working or c) they don't use it internally so don't believe anyone else does either
0
 
Jamie GarrochPowerPoint Consultant & DeveloperAuthor Commented:
No other contributor managed to find a solution.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.