0
votes

I am in the process of automating some data output powerpoints and I need a script that will copy all text boxes with text to all the slides, also I need to specify the orientation (left/top/width/height) . I am setting up just the first slide with a tittle and want it to copy to 100+ slides in the exact same orientation.

I was able to find the following code:

Dim oSh As Shape Dim x As Long

 Set oSh = ActiveWindow.Selection.ShapeRange(1)

 For x = 2 To ActivePresentation.Slides.Count
     oSh.Copy
     ActivePresentation.Slides(x).Shapes.Paste
 Next

but it requires me to have the text box selected, and that is not what I want. I've searched but cannot seem to find what I want .

Thank you !

1

1 Answers

0
votes
'Set oSh = ActiveWindow.Selection.ShapeRange(1)
Set oSh = ActivePresentation.Slides(1).Shapes(n)
' You'll need to work out the value of n for your particular slide layout

 For x = 2 To ActivePresentation.Slides.Count
     oSh.Copy
     ActivePresentation.Slides(x).Shapes.Paste
 Next