Sorry for flooding the forum lately, but I am almost done with my template. I have started testing my template and realized, that whenever I create a presentation, and delete a slide within that presentation the CUstomLayout used on that slide will be automatically deleted with it, unless another slide is using it as well.
Is there a way to protect the CustomLayouts or do I have unknowingly some weird settings turned on?
Thanks a lot seba
On save if not before, PPT will delete any unused custom layouts unless they're "pinned" in the UI or in code, you'd set the CustomLayout's Preserved property to True. This should set all of the layoouts in the active presentation to Preserved:
With ActivePresenation
For x = 1 to .Designs.Count
For y = 1 to .Designs.SlideMaster.CustomLayouts.Count
.Designs.SlideMaster.CustomLayouts(y).Preserved = True
Next
Next
End With