# Search Text in PPTX Presentation Files using Java

> Search text in PPTX presentations in Java using Aspose.Slides for Java.

Source: https://products.aspose.com/slides/java/search/pptx/
Updated: 2026-07-09



## Search Text in PPTX Presentation via Java

Using [Aspose.Slides for Java](/slides/java/), you can search text in PPTX presentations. Use the `SlideUtil.getAllTextBoxes` method to collect text frames and then inspect `ITextFrame`, `IParagraph`, and `IPortion` objects.

### Search Text in PPTX Presentation using Java

```java
Presentation presentation = new Presentation("welcome-to-powerpoint.pptx");
try {
    String searchText = "PowerPoint";

    for (ISlide slide : presentation.getSlides()) {
        ITextFrame[] slideTextFrames = SlideUtil.getAllTextBoxes(slide);

        for (ITextFrame textFrame : slideTextFrames) {
            for (IParagraph paragraph : textFrame.getParagraphs()) {
                for (IPortion portion : paragraph.getPortions()) {
                    if (portion.getText().contains(searchText)) {
                        System.out.println(portion.getText());
                    }
                }
            }
        }
    }
} finally {
    presentation.dispose();
}
```

## How to Search Text in PPTX via Java

These are the steps to search text in PPTX files.

Load the `PPTX` file with the `Presentation` class.

Call the `SlideUtil.getAllTextBoxes` method to collect text frames from each slide.

Inspect `ITextFrame`, `IParagraph`, and `IPortion` objects to find matching text.

## Other Supported Search Formats
