In Powerpoint sometimes it is a bit boring (or challenging), when one has to make the shapes in a presentation the same size and to drag them to the same position. As far as there is no macro recorder there, you only have to find your way around it.
In this article, I will simply show how to iterate through all form in an active slide and simply change their properties. It may seem lame, but it’s not 🙂
Public Sub TestMe()
Dim sh As Shape
Dim sld As Slide
Set sld = Application.ActiveWindow.View.Slide
For Each sh In sld.Shapes
If sh.Fill.ForeColor.RGB <> RGB(210, 210, 210) Then
.Fill.ForeColor.RGB = RGB(0, 0, 0)
.Width = 700
.Height = 20
.Top = 80
.Left = 30
.Name = "TitleTextBox"
.Fill.Visible = msoFalse
.Fill.Transparency = 1#
The objects are Shape and Slide. Slide is accessed through ActiveWindow.View.Slide. All shapes are accessed through the Shapes collection, available in the Slide. The rest is quite easy, we simply set the needed properties.