Create Custom Shapes in PowerPoint with C# REST API

Follow this article to create custom shapes in PowerPoint with C# REST API. You will learn to automatically create and add custom shapes for PowerPoint with C# RESTful Service. It shares all the details to create a shape, set its parameters, and add to a particular slide.

Prerequisite

Steps to Add PPT Shape with C# REST API

  1. Create the SlidesApi object and upload the source presentation for adding shapes to it
  2. Specify that the slide type to modify is a Master Slide
  3. Create a new shape object with specific properties
  4. Add the new shape to the specified slide using the CreateSpecialSlideShape() method
  5. Download the updated presentation file with the new shape in it

These steps explain how to generate presentation shapes with C# REST API. Create the SlidesApi object, upload the presentation to the Cloud storage, specify the type of slide to be modified, and instantiate the Shape object using the desired parameters. Add the shape to the master slide and download the updated presentation with the new shape in it.

Code to Add Shape for PPT with C# REST Interface

This code demonstrates how to handle shapes for slides with C# RESTful Service. You may add any type of shapes using the enumerator GeometryShape.ShapeTypeEnum including Lines, Triangle, Rectangle, and Diamond etc. The option is also available to select other special types of slides such as LayoutSlide and NotesSlide.

This article has taught us to draw shapes on a slide. To add pictures, refer to the article Add Picture to PowerPoint with C# REST API.

 Ελληνικά