Very hard coded way to tell two ContentPlaceHolders with the same name apart (the left one and the right one)
No error checking AT ALL
John's taught me a lot about the PP object model, but I still wish PP had an Excel quality macro recorder
Also, while the .Name properties can be the same, the .Id properties are still different
Option Explicit
Sub test()
Dim oPresentation As Presentation
Dim oSlide As Slide
Dim oShape As Shape
Dim oContentLeft As Shape, oContentRight As Shape
Set oPresentation = ActivePresentation
Set oSlide = oPresentation.Slides(2)
For Each oShape In oSlide.Shapes
With oShape
If .Name = "Content Placeholder 8" Then
If oContentLeft Is Nothing And oContentRight Is Nothing Then
Set oContentLeft = oShape
Else
Set oContentRight = oShape
End If
End If
End With
Next
If oContentLeft.Left > oContentRight.Left Then
Set oShape = oContentLeft
Set oContentLeft = oContentRight
Set oContentRight = oShape
End If
MsgBox "Left one = " & oContentLeft.Id
MsgBox "Right one = " & oContentRight.Id
End Sub
Once you have the 2 shapes Set, then you can test or do things
Look at the attached file if you want, but save it and just rename it to remove the .zip part since I can't seem to upload .PPTM files