Apache POI SL - Set Slide Title

SlideShow ppt = new SlideShow();
Slide slide = ppt.createSlide();
TextBox title = slide.addTitle();
title.setText("Hello, World!");

Aspose.Slides

//Create a presentation
Presentation pres = new Presentation();

//Add the title slide
ISlide slide = pres.getSlides().addEmptySlide(pres.getLayoutSlides().get_Item(0));

//Set the title text
((IAutoShape)slide.getShapes().get_Item(0)).getTextFrame().setText("Slide Title Heading");

//Set the sub title text
((IAutoShape)slide.getShapes().get_Item(1)).getTextFrame().setText("Slide Title Sub-Heading");


Download Source Code

For More Examples, Please Visit Aspose Docs

Last edited Aug 29, 2014 at 5:43 AM by shoaibkhan, version 2