簡體   English   中英

如何在c#中將形狀從一張幻燈片復制到另一張幻燈片?

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

我需要從presentation1到presentation2插入形狀。 我們可以插入一張幻燈片

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

但我只希望將Presentation1.slide(x)中的形狀插入到Presentation2.slide(y)中。

我怎么能用C#做這個? 請幫我。

謝謝P2000

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM