# Adding Shapes to Presentation

> 

Source: https://docs.aspose.com/slides/net/adding-shapes-to-presentation/
Updated: 2026-08-05


## **VSTO**
Below is the code snippet for adding line shape:

``` csharp
using Aspose.Slides;


   Slide slide = Application.ActivePresentation.Slides[1];

  slide.Shapes.AddLine(10, 10, 100, 10);

``` 
## **Aspose.Slides**
To add a simple plain line to a selected slide of the presentation, please follow the steps below:

- Create an instance of Presentation class
- Obtain the reference of a slide by using its Index
- Add an AutoShape of Line type using AddAutoShape method exposed by Shapes object
- Write the modified presentation as a PPTX file

In the example given below, we have added a line to the first slide of the presentation.

``` csharp
using Aspose.Slides;


   //Instantiate Prseetation class that represents the PPTX

  Presentation pres = new Presentation();

  //Get the first slide

  ISlide slide = pres.Slides[0];

  //Add an autoshape of type line

  slide.Shapes.AddAutoShape(ShapeType.Line, 50, 150, 300, 0);

``` 
## **Download Running Code**
- [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/releases/tag/AsposeSlidesVsVSTOv1.1)
## **Download Sample Code**
- [Github](https://github.com/aspose-slides/Aspose.Slides-for-.NET/tree/master/Plugins/Aspose.Slides%20Vs%20VSTO%20Presentations/Code%20Comparison%20of%20Common%20Features/Adding%20Shape%20to%20Presentation)



## Related articles

- [Add Picture Frame to Presentation](https://docs.aspose.com/slides/net/add-picture-frame-to-presentation/)
- [Add Image in Table Cell](https://docs.aspose.com/slides/net/add-image-in-table-cell/)
- [Change the fill color of a shape in a presentation](https://docs.aspose.com/slides/net/change-the-fill-color-of-a-shape-in-a-presentation/)