# Manage Slide Sections in Presentations Using Java

> Streamline slide sections in PowerPoint and OpenDocument with Aspose.Slides for Java — split, rename, and reorder to optimize PPTX and ODP workflows.

Source: https://docs.aspose.com/slides/java/slide-section/
Updated: 2026-08-05


## **Introduction**

With Aspose.Slides for Java, you can organize a PowerPoint Presentation into sections. You get to create sections that contain specific slides. 

You may want to create sections and use them to organize or divide slides in a presentation into logical parts in these situations:

- When you are working on a large presentation with other people or a team—and you need to assign certain slides to a colleague or some team members. 
- When you are dealing with a presentation that contains many slides—and you are struggling to manage or edit its contents at once.

Ideally, you should create a section that houses similar slides—the slides have something in common or they can exist in a group based on a rule—and give the section a name that describes the slides inside it. 

## **Create Sections in Presentations**

To add a section that will house slides in a presentation, Aspose.Slides for Java provides the [addSection()](https://reference.aspose.com/slides/java/com.aspose.slides/ISectionCollection#addSection-java.lang.String-com.aspose.slides.ISlide-) method that allows you to specify the name of the section you intend to create and the slide from which the section starts. 

This sample code shows you to create a section in a presentation in Java:

```java
import com.aspose.slides.*;

Presentation pres = new Presentation();
try {
    ISlide defaultSlide = pres.getSlides().get_Item(0);
    ISlide newSlide1 = pres.getSlides().addEmptySlide(pres.getLayoutSlides().get_Item(0));
    ISlide newSlide2 = pres.getSlides().addEmptySlide(pres.getLayoutSlides().get_Item(0));
    ISlide newSlide3 = pres.getSlides().addEmptySlide(pres.getLayoutSlides().get_Item(0));
    ISlide newSlide4 = pres.getSlides().addEmptySlide(pres.getLayoutSlides().get_Item(0));

    ISection section1 = pres.getSections().addSection("Section 1", newSlide1);
    ISection section2 = pres.getSections().addSection("Section 2", newSlide3); // section1 will be ended at newSlide2 and after it section2 will start   

    pres.save("pres-sections.pptx", SaveFormat.Pptx);

    pres.getSections().reorderSectionWithSlides(section2, 0);
    pres.save("pres-sections-moved.pptx", SaveFormat.Pptx);

    pres.getSections().removeSectionWithSlides(section2);

    pres.getSections().appendEmptySection("Last empty section");

    pres.save("pres-section-with-empty.pptx",SaveFormat.Pptx);
} finally {
    if (pres != null) pres.dispose();
}
```

## **Change the Names of Sections**

After you create a section in a PowerPoint presentation, you may decide to change its name. 

This sample code shows you how to change the name of a section in a presentation in Java using Aspose.Slides:

```java
import com.aspose.slides.*;

Presentation pres = new Presentation("pres.pptx");
try {
    ISection section = pres.getSections().get_Item(0);
    section.setName("My section");
} finally {
    if (pres != null) pres.dispose();
}
```

## **FAQ**

### Are sections preserved when saving to the PPT (PowerPoint 97–2003) format?

No. The PPT format does not support section metadata, so section grouping is lost when saving to .ppt.

### Can an entire section be "hidden"?

No. Only individual slides can be hidden. A section as an entity has no "hidden" state.

### Can I quickly find a section by a slide and, conversely, the first slide of a section?

Yes. A section is uniquely defined by its starting slide; given a slide you can determine which section it belongs to, and for a section you can access its first slide.



## Related articles

- [Section](https://docs.aspose.com/slides/java/examples/elements/section/)