Free Support Forum -

How to make all shapes as group in a slide


Please suggest that how to make group of all shapes in a slide.



You can please try using following sample code to add the shape to group shape.

        Presentation pres = new Presentation("test.pptx");
        ISlide slide = pres.Slides[0];

        //Shape to be added to group shape
        IShape shapeTobeAddedinGroupShape = slide.Shapes[0];

        //Adding a group shape
        IGroupShape groupShape = slide.Shapes.AddGroupShape();

        //Adding exisiting shape inside group shape

        //Removing the shape from slide

        pres.Save("saved.pptx", Aspose.Slides.Export.SaveFormat.Pptx);


Thanks for sharing this, It is working fine.


It’s good to know that suggested option has worked.