I want to create a new slide from an old slide , new slide should have all the group shapes from old slides saved as images . New slide should look exactly same as old one.
@rahulvalecha145,
Thank you for your request. You can add a group shape as an image to a new slide as below:
foreach (var shape in oldSlide)
{
if (shape is IGroupShape)
{
var image = presentation.Images.AddImage(shape.GetThumbnail());
newSlide.Shapes.AddPictureFrame(ShapeType.Rectangle, shape.X, shape.Y, image.Width, image.Height, image);
}
}
API Reference: IShape Interface, IImageCollection Methods, IShapeCollection.AddPictureFrame Method