We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Adding text frame to picture frame throws exception

I want to add a label to a picture such that they are grouped together i.e. when the presentation is opened in powerpoint moving the picture will move the text with it. My code is as follows

Bitmap b = new Bitmap(filename);

PictureFrame pf = p.Slides[0].Shapes.AddPictureFrame(picId, xOffset, yOffset, b.Width, b.Height);

TextFrame tf = pf.AddTextFrame("DEVICE: " + DeviceName);

this is throwing a "Text frame cant be added to a picture frame" exception. What am I doing wrong or how can I achieve this ?

Hi Simon,

Thanks for considering Aspose.Slides.

I regret to inform you that unfortunately at the moment you may not add a text frame in a picture frame. As a work around you may add a picture frame and a text frame separately and group them together in a group shape.

We are sorry for your inconvenience,