Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fileformat-slides-gists/8442d81ed3015e4afa08af12e1277901 to your computer and use it in GitHub Desktop.
Save fileformat-slides-gists/8442d81ed3015e4afa08af12e1277901 to your computer and use it in GitHub Desktop.
How to Add Text to a Slide Programmatically using C# Open-Source API | FileFormat.Slides
// Create an instance of new presentation
Presentation presentation = Presentation.Create($"{documentDirectory}/{filename}");
// Create an instance of TextShape
TextShape shape = new TextShape();
// Set text of the TextShape
shape.Text = "FileFormat.Slides Text Shape Example";
// Create Slide
Slide slide = new Slide();
// Add text shapes.
slide.AddTextShapes(shape);
// Add slide to the presentation
presentation.AppendSlide(slide);
// Save presentation
presentation.Save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment