Pregunta

Is it possible to use VBA to hide/show a text box on a Custom Layout in a PowerPoint 2010? I would like to hide/show a specific text box that is on the custom layout of each slide at the click of a button and am not sure of the best way to go about doing that.

Any help, much appreciated.

¿Fue útil?

Solución

Suppose you have a shape named Rectangle 6 on the third layout of the first slide master.

Sub Example()
Dim oSh As Shape

' Get a reference to the shape
Set oSh = ActivePresentation.Designs(1).SlideMaster.CustomLayouts(3).Shapes("Rectangle 6")

' Set its visible property to false
oSh.Visible = False

End Sub

Otros consejos

Generally, yes, though setting some shapes (title placeholder on the master, for example) won't necessarily make the title text on individual slides disappear. "Slide master" can mean different things in different PPT versions. Which are you targeting, and do you want to hide a shape on ALL masters/layouts in the presentation or just some?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top