Raj
Raj

Reputation: 4435

Internals of copy paste slide in PowerPoint

I have a highly customized PowerPoint template with a layout named "Title and Content".

When I copy paste (using Destination theme option) a "Title and Content" slide from a presentation based on my customized template to default Office template based presentation, pasted slide ended up with a layout named "1_Title and Content" even though default Office template has "Title and Content" layout.

I was expecting copy pasted slide to follow destination theme and use layout available if layout names are matching. Any idea why that is not happening in this case? How do I force such a behavior using VSTO?

Upvotes: 0

Views: 243

Answers (1)

Steve Rindsberg
Steve Rindsberg

Reputation: 14809

If your layout were exactly identical to the existing one, PPT would use the existing one. If it's the least bit different, to avoid corrupting either the pasted slide or the other existing slides, PPT will give you those #_XYZ numbered+named layouts.

You can't prevent it.

You can, instead, write code to look for these #XYZ layouts, find the matching layout w/o the # and apply it to the slide, then delete the #_ version of the layout.

Or, possibly, instead of copy/pasting the slide, create a new slide in the target presentation (based on the same layout as the source slide), then copy/paste the content into it.

Upvotes: 1

Related Questions