# Adding Text Dynamically Using VSTO and Aspose.Slides for Java

> See how to migrate from Microsoft Office automation to Aspose.Slides for Java and add dynamic text to PowerPoint (PPT, PPTX) presentations in Java.

Source: https://docs.aspose.com/slides/java/adding-text-dynamically-using-vsto-and-aspose-slides-for-java/
Updated: 2026-08-13


{{% alert color="info" %}} 

A common task that developers are developers to accomplish is adding text to slides dynamically. This article shows code examples for adding text dynamically using [VSTO](/slides/java/adding-text-dynamically-using-vsto-and-aspose-slides-for-java/) and [Aspose.Slides for Java](/slides/java/adding-text-dynamically-using-vsto-and-aspose-slides-for-java/).

{{% /alert %}} 
## **Adding Text Dynamically**
Both methods follow these steps:

1. Create a presentation.
1. Add a blank slide.
1. Add a text box.
1. Set some text.
1. Write the presentation.
## **VSTO Code Example**
The code snippets below results in a presentation with a plain slide and a string of text on it.

**The presentation as created in VSTO** 

![todo:image_alt_text](adding-text-dynamically-using-vsto-and-aspose-slides-for-java_1.png)

{{< gist "aspose-com-gists" "a56eda38c01ad33dc653116c7bae4293" "Examples-CSharp-VSTO-AddTextBoxVSTO-AddTextBoxVSTO.cs" >}}
## **Aspose.Slides for Java Example**
The code snippets below use Aspose.Slides to create a presentation with a plain slide and a string of text on it.

**The presentation as created using Aspose.Slides for Java** 

![todo:image_alt_text](adding-text-dynamically-using-vsto-and-aspose-slides-for-java_2.png)

{{< gist "aspose-com-gists" "1f55f0222bc39a382d831900e8de7400" "Examples-src-main-java-com-aspose-slides-examples-Text-AddTextBox-AddTextBox.java" >}}



## Related articles

- [Creating Tables Using VSTO and Aspose.Slides for Java](https://docs.aspose.com/slides/java/creating-a-table-on-powerpoint-slide/)
- [Format Text Using VSTO and Aspose.Slides for Java](https://docs.aspose.com/slides/java/format-text-using-vsto-and-aspose-slides-for-java/)
- [Migration from Microsoft Office Automation to Aspose.Slides for Java](https://docs.aspose.com/slides/java/migration-from-microsoft-office-automation-to-aspose/)