Format Text using VSTO and Aspose.Slides for Java
Contents
[
Hide
]
Sometimes, you need to format the text on slides programmatically. This article shows how to read a sample presentation with some text on the first slide using either VSTO and Aspose.Slides for Java. The code formats the text in the third textbox on the slide to look like the text in the last textbox.
Formatting Text
Both the VSTO and Aspose.Slides methods take the following steps:
- Open the source presentation.
- Access the first slide.
- Access the third text box.
- Change the formatting of the text in the third text box.
- Save the presentation to disk.
The screenshots below show the sample slide before and after the execution of the VSTO and Aspose.Slides for Java code.
The input presentation
VSTO Code Example
The code below shows how to reformat text on a slide using VSTO.
The text reformatted with VSTO
Aspose.Slides for Java Example
To format text with Aspose.Slides, add the font before formatting the text.
The output presentation created with Aspose.Slides