0
votes

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.

2

2 Answers

1
votes

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
0
votes

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?