本文介绍了在C#中的Powerpoint模板中插入图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有功率点幻灯片,其中我试图插入图片,但是没有找到任何相关选项,这里是我的代码片段


 


  objApp = new PowerPoint.Application();

            objApp.Visible = MsoTriState.msoTrue;

            objPresSet = objApp.Presentations;

            objPres = objPresSet.Open(strTemplate,

                MsoTriState.msoFalse, MsoTriState.msoTrue,MsoTriState.msoTrue);

            objSlides = objPres.Slides;


 


  objSlide = objSlides.Add(1,PowerPoint.PpSlideLayout.ppLayoutTitleOnly);

            // objTextRng = objSlide.Shapes [1] .TextFrame.TextRange;

           objSlide.Shapes.AddPicture(strPic,MsoTriState.msoFalse,MsoTriState.msoTrue,

                 150,150,500,250);


 


如果任何人可以帮助我,请紧急

p>

谢谢


Amit Tiwari

解决方案

Hi ,

I have power point slide in which i am trying to insert image ,but haven't found any relevant option here is my code snippet

  objApp = new PowerPoint.Application();
            objApp.Visible = MsoTriState.msoTrue;
            objPresSet = objApp.Presentations;
            objPres = objPresSet.Open(strTemplate,
                MsoTriState.msoFalse, MsoTriState.msoTrue, MsoTriState.msoTrue);
            objSlides = objPres.Slides;

 objSlide = objSlides.Add(1, PowerPoint.PpSlideLayout.ppLayoutTitleOnly);
            //objTextRng = objSlide.Shapes[1].TextFrame.TextRange;
           objSlide.Shapes.AddPicture(strPic, MsoTriState.msoFalse, MsoTriState.msoTrue,
                150, 150, 500, 350);

please if any one can help me out ,its urgent

thanks

Amit Tiwari

解决方案


这篇关于在C#中的Powerpoint模板中插入图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-19 06:16