This project is read-only.

Aspose.Slides - Replace Text in Placeholder

//Instantiate Presentation class that represents PPTX
Presentation pres = new Presentation("data/demo.pptx");

//Access first slide
ISlide slide = pres.getSlides().get_Item(0);

IShape shape= null;

//Iterate through the shapes and set a reference to the table found
for (int i = 0 ; i < slide.getShapes().size() ; i++)
    shape = slide.getShapes().get_Item(i);
    if (shape.getPlaceholder() != null)
        //Change the text of each placeholder
        ((IAutoShape)shape).getTextFrame().setText("This is Placeholder");

//Write the PPTX to Disk"data/AsposeReplaceTxt.pptx",SaveFormat.Pptx);

Download Source Code
For More Examples, Please Visit Aspose Docs

Last edited Oct 14, 2014 at 8:29 PM by shoaibkhan, version 7