Browse our Products

Aspose.Slides for Python 23.2 Release Notes

KeySummaryCategoryRelated Documentation
SLIDESPYNET-85Use Aspose.Slides for Net 23.2 featuresEnhancement

Public API Changes

Find and replace text fragments with changes in formatting

We implemented support for finding and replacing text fragments with changes in formatting. A new method in the public API has been added for this purpose: SlideUtil.find_and_replace_text.

This Python code demonstrates a search for all portions of “[this block]” and then replaces them with “my text” filled in red:

import aspose.slides as slides
import aspose.pydrawing as draw

with slides.Presentation("pres.pptx") as pres:
    format = slides.PortionFormat()
    format.font_height = 24
    format.font_italic = 2
    format.fill_format.fill_type = slides.FillType.SOLID
    format.fill_format.solid_fill_color.color =

    slides.util.SlideUtil.find_and_replace_text(pres, True, "[this block]", "my text", format)"replaced.pptx", slides.export.SaveFormat.PPTX)