// Load presentation Presentation pres = new Presentation("mytextone.pptx"); String strToFind = "search string"; String strToReplaceWith = "replace string"; // Loop through each slide for (ISlide slide : pres.getSlides()) { // Get all text frames in the slide ITextFrame[] tf = SlideUtil.getAllTextBoxes(slide); for (int i = 0; i < tf.length; i++) for (IParagraph para : tf[i].getParagraphs()) for (IPortion port : para.getPortions()) // Find text to be replaced if (port.getText().contains(strToFind)) { // Replace exisitng text with the new text String str = port.getText(); int idx = str.indexOf(strToFind); String strStartText = str.substring(0, idx); String strEndText = str.substring(idx + strToFind.length(), str.length() - 1 - (idx + strToFind.length() - 1)); port.setText(strStartText + strToReplaceWith + strEndText); } } // Save the presentation pres.save("myTextOneAspose.pptx", SaveFormat.Pptx);