Turning off text outline with VBA in PowerPoint

This is odd behaviour. I am trying to turn off the outline for text within a shape in PowerPoint 2013. To test the behaviour I added a simple text box to a blank slide, making sure it's selected. I then activate the text Format pane to observe the properties. I then turn on the outline programmatically in the VBE:


Open in new window

This works and I can now see the text outline on the slide and the corresponding properties in the Format pane.

But this doesn't turn the line off:


Open in new window

I've tried setting the Width to 0 and the Transparency to 1 but the Format pane still shows the line as Solid Line.

I suspect I'm looking at the wrong part of the object model as I also can't see the MsoLineFillType, which I need to access a gradient line fill.
LVL 15
Jamie GarrochSenior Technical Consultant at BrightCarbonAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think the answer is simple but not helpful!

The object model is broken. It should work but it doesn't (not in 2010 either) There's a similar problem with table borders.

There is no vba support for gradient lines at all.

To get what you need you would have to work in the XML (not simple) a possible workaround might be to create a copy with no line and use .pickup and .apply to copy the format over. Clumsy but it can work.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jamie GarrochSenior Technical Consultant at BrightCarbonAuthor Commented:
A great answer demonstrating knowledge of the subject with multiple workarounds.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft PowerPoint

From novice to tech pro — start learning today.