How can I copy shapes from one slide to another slide in c#?

↘锁芯ラ 提交于 2019-12-18 08:57:51

问题


I need to insert shape(s) from presentation1 to presentation2. We can insert a slide like

pptApp.Presentations[Presentation2].Slides.InsertFromFile("presenation1", 10,2,2);

But I want only the shapes from Presentation1.slide(x) inserted to Presentation2.slide(y).

How can i Do this in C#? Please help me.

Thanks P2000


回答1:


var origSlide = origPres.Slides[slideNum];
var destSlide = newPres.Slides[slideNum];
foreach (Shape origShape in origSlide.Shapes)
{
    origShape.Copy();
    newPres.Slides.Paste(slideNum);
}


来源:https://stackoverflow.com/questions/5740749/how-can-i-copy-shapes-from-one-slide-to-another-slide-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!