Menu

Set Slide Title

Shoaib

Apache POI SL

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


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.