# Ink Shape

DsWord supports creating and modifying Ink shapes in documents.

## Content

Ink shapes are user-drawn shapes which can include lines and curves.
DsWord supports ink shapes which can be added by using [Add](/document-solutions/dot-net-word-api/api/online/DS.Documents.Word/GrapeCity.Documents.Word.InkShapeCollection.Add.html) and [Insert](/document-solutions/dot-net-word-api/api/online/DS.Documents.Word/GrapeCity.Documents.Word.InkShapeCollection.Insert.html) methods of [InkShapeCollection](/document-solutions/dot-net-word-api/api/online/DS.Documents.Word/GrapeCity.Documents.Word.InkShapeCollection.html) class. You can also access the previous or next ink shapes and get the xml document containing ink shape's content by using various methods provided by [InkShape](/document-solutions/dot-net-word-api/api/online/DS.Documents.Word/GrapeCity.Documents.Word.InkShape.html) class.
In DsWord, you can create a new ink shape by providing an xml document which describes ink drawing or load a document with predefined ink shapes.

## Modify Ink Shape

To modify an existing ink shape in a document:

1. Load the document containing ink shape using **Load** method of **GcWordDocument** class.
2. Access the ink shape by using [InkShapes](/document-solutions/dot-net-word-api/api/online/DS.Documents.Word/GrapeCity.Documents.Word.RangeBase.InkShapes.html) property of **RangeBase** class.
3. Modify ink shape by setting various properties of **ShapeBase** class like AlternativeText, Rotation, Title, Height and Width etc

    ```csharp
    var doc = new GcWordDocument();
    
    //Load doc containing ink shape
    doc.Load("ink.docx");
    
    if (doc.Body.InkShapes.Count == 0)
        return;
    
    //Access first ink shape
    var ink = doc.Body.InkShapes.First;
    
    //Modify Ink shape
    ink.BlackWhiteMode = BlackWhiteMode.LightGray;
    ink.AlternativeText = "xyz";
    ink.Rotation.HorizontalFlip = true;
    ink.Title = "ink shape title";
    ink.Size.Height.Value = 300;
    ink.Size.Width.Value = 100;
    
    //Save document
    doc.Save("InkShapeModified.docx");
    ```