Bryce Bassett
asked on
Programmatically change PowerPoint picture placeholder from rectangle to oval?
I'm building a PowerPoint (2010) template to conform to our new company design. It includes a lot of round picture placeholders. Manually, it's easy to create a new slide layout, insert a picture placeholder (which comes in by default as a rectangle), then use change shape to change it to an oval. I just need to accomplish that with VBA. The following code creates a new layout and adds the picture placeholder.
Now how would I change "ph" to an oval?
Thanks
layoutcount = ActivePresentation.Designs(1).SlideMaster.CustomLayouts.Count
Set newlayout = ActivePresentation.Designs(1).SlideMaster.CustomLayouts _
.Add(layoutcount + 1)
Set ph = newlayout.Shapes.AddPlaceholder(ppPlaceholderPicture, _
Left:=100, Top:=200, Width:=100, Height:=100)
Now how would I change "ph" to an oval?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You'd be amazed how many folk don't think declaring variables correctly is important! (Well maybe not)
ASKER
Thanks.
Yes, I always declare my variables and use Option Explicit. I just was posting a snippet of my code. But good reminder