Free Support Forum -

PictureFrame in ppt?

Hi Apose guys,

As your document; in order to insert an image to a slide, the slide must have a picture frame.
And code likes this:
int picid = pres.Pictures.Add(new Picture(pres, “WaterDrops.jpg”));((PictureFrame)pres.Slides[0].Shapes[i]).PictureId = picid;

I created a textbox, a shape. But when I iterated them in code, they are TextFrame.
So, I need to create a picture frame in ppt file. How I create a picture frame in in ppt file?

Thanks and best regards!

Hi Vuong,

Please visit this documentation link to see how to add Picture Frame in PPT. Please share with us if you still face any issue.

Thanks and Regards,

Hi Mudassir,

Thank for quick reply.
I read this example and Slide API before I posted this thread.
I mean:
- I want to create a template, I need to add a textbox/shape(is understood as TextFrame by Aspose Silde) and “one thing” that needs understood as PictureFrame by Aspose Slide.
- Then, I will add text to
textbox/shape and image to “one thing”.
- I don’t mean how to add PictureFrame to ppt file by Aspose Slide code. Because I have aspose demos, but there is no template file for picture demo. So, I don’t know how “picture frame” in template file looks like.

Hi Vuong,

You may need to add the Picture in PowerPoint and it will be read as PictureFrame in Aspose.Slides. For your reference, I have also attached the sample template as well.

Thanks and Regards,