Created
December 7, 2024 06:06
-
-
Save documentprocessing/4d6831a0887a9b763506c11713f635b1 to your computer and use it in GitHub Desktop.
Insert Text in PowerPoint Presentation PPTX file in .NET
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a new PowerPoint presentation at the specified file path | |
Presentation presentation = Presentation.Create("PowerPointPreesentation.pptx"); | |
// Create a text shape for the title and set its properties | |
TextShape shape = new TextShape(); | |
shape.Text = "Title: First Title From Fileformat.Dev"; | |
shape.TextColor = "980078"; | |
shape.FontFamily = "Arial"; | |
// Create the slide and add the text shape to it | |
Slide slide = new Slide(); | |
slide.AddTextShapes(shape); | |
// Append the slide to the presentation | |
presentation.AppendSlide(slide); | |
// Save the modified presentation | |
presentation.Save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment