Link to home
Start Free TrialLog in
Avatar of Jamie Garroch (MVP)
Jamie Garroch (MVP)Flag for United Kingdom of Great Britain and Northern Ireland

asked on

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:

ActiveWindow.Selection.ShapeRange(1).TextFrame2.TextRange.Font.Line.Visible=msoTrue

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:

ActiveWindow.Selection.ShapeRange(1).TextFrame2.TextRange.Font.Line.Visible=msoFalse

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.
ASKER CERTIFIED SOLUTION
Avatar of John Wilson
John Wilson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jamie Garroch (MVP)

ASKER

A great answer demonstrating knowledge of the subject with multiple workarounds.