简体   繁体   English

使用C#调用PowerPoint幻灯片

[英]calling powerpoint Slide using C#

i wanna make a program to update a chart from excel to powerpoint. 我想制作一个程序,将图表从Excel更新到Powerpoint。

if i wanna add a slide in powerpoint, i'm using this script 如果我想在幻灯片中添加幻灯片,我正在使用此脚本

pptNS._Presentation opres = pres.Open(@"" + textBox5.Text + "", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue);

pptSlide = opres.Slides.Add(1, pptNS.PpSlideLayout.ppLayoutBlank);

but, i confused when i should get slide name to update data .. can somebody help me ? 但是,当我应该获得幻灯片名称来更新数据时,我感到困惑。有人可以帮助我吗? thanks ... 谢谢 ...

After: 后:

pptSlide = opres.Slides.Add(1, pptNS.PpSlideLayout.ppLayoutBlank);

pptSlide.Name (or equivalent syntax) should give you the name PPT has assigned to the slide. pptSlide.Name(或等效语法)应为您提供PPT分配给幻灯片的名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM