PDA

View Full Version : [SOLVED:] Move Title on every slide



Raybob
02-17-2022, 02:07 PM
I am trying to change the top location of the title on every slide in my ppt, but my code is only moving the title on the first slide. I am new to VBA so I am running out of ideas on how to make it work.


Sub RepositionTitle()
Dim sld As Slide
For Each sld In ActivePresentation.Slides
If sld.Shapes.HasTitle Then
ActivePresentation.Slides(1).Shapes.Title.Top = 72 * 0.12
End If
Next sld
End Sub

Paul_Hossler
02-17-2022, 09:20 PM
Not tested



Sub RepositionTitle()
Dim sld As Slide
For Each sld In ActivePresentation.Slides
If sld.Shapes.HasTitle Then
sld.Shapes.Title.Top = 72 * 0.12 ' <<<<<<<<<<<<<<<<<<<<
End If
Next sld
End Sub

Raybob
02-18-2022, 05:36 AM
Thank you Paul! Your solution works!