# GrapeCity.Documents.Word.ShapeCollection.Add

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Word_ShapeCollection_Add_" data-uid="GrapeCity.Documents.Word.ShapeCollection.Add*">Add Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Word_ShapeCollection_Add_" data-uid="GrapeCity.Documents.Word.ShapeCollection.Add*"></a>
<h4 id="GrapeCity_Documents_Word_ShapeCollection_Add" data-uid="GrapeCity.Documents.Word.ShapeCollection.Add">Add()</h4>
<div class="markdown level1 summary"><p>Inserts a new 100 x 100 points <a class="xref" href="GrapeCity.Documents.Word.GeometryType.html#GrapeCity_Documents_Word_GeometryType_Rectangle">Rectangle</a> <a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a> into this collection at the <a class="xref" href="GrapeCity.Documents.Word.InsertLocation.html#GrapeCity_Documents_Word_InsertLocation_End">End</a> location.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Shape Add()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add() As Shape</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a></td>
      <td><p>The added <a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Word_ShapeCollection_Add_" data-uid="GrapeCity.Documents.Word.ShapeCollection.Add*"></a>
<h4 id="GrapeCity_Documents_Word_ShapeCollection_Add_System_Single_System_Single_System_String_" data-uid="GrapeCity.Documents.Word.ShapeCollection.Add(System.Single,System.Single,System.String)">Add(float, float, string)</h4>
<div class="markdown level1 summary"><p>Inserts a new <a class="xref" href="GrapeCity.Documents.Word.GeometryType.html#GrapeCity_Documents_Word_GeometryType_Rectangle">Rectangle</a> <a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a> with a specified size and text into this collection at the <a class="xref" href="GrapeCity.Documents.Word.InsertLocation.html#GrapeCity_Documents_Word_InsertLocation_End">End</a> location.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Shape Add(float width, float height, string text = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(width As Single, height As Single, Optional text As String = Nothing) As Shape</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The shape width, in points.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The shape height, in points.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>If not null, a <a class="xref" href="GrapeCity.Documents.Word.TextFrame.html">TextFrame</a> with this text is added to the shape.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a></td>
      <td><p>The added <a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Word_ShapeCollection_Add_" data-uid="GrapeCity.Documents.Word.ShapeCollection.Add*"></a>
<h4 id="GrapeCity_Documents_Word_ShapeCollection_Add_System_Single_System_Single_System_String_GrapeCity_Documents_Word_GeometryType_" data-uid="GrapeCity.Documents.Word.ShapeCollection.Add(System.Single,System.Single,System.String,GrapeCity.Documents.Word.GeometryType)">Add(float, float, string, GeometryType)</h4>
<div class="markdown level1 summary"><p>Inserts a new <a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a> with a specified size, text and geometry into this collection at the <a class="xref" href="GrapeCity.Documents.Word.InsertLocation.html#GrapeCity_Documents_Word_InsertLocation_End">End</a> location.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Shape Add(float width, float height, string text, GeometryType type)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(width As Single, height As Single, text As String, type As GeometryType) As Shape</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The shape width, in points.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The shape height, in points.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>If not null, a <a class="xref" href="GrapeCity.Documents.Word.TextFrame.html">TextFrame</a> with this text is added to the shape.
<p>Note that some geometries do not allow text frames (see <a class="xref" href="GrapeCity.Documents.Word.Extensions.TextFrameSupported.html#GrapeCity_Documents_Word_Extensions_TextFrameSupported_GrapeCity_Documents_Word_GeometryType_">TextFrameSupported(GeometryType)</a>).
If this parameter is not null and <code class="paramref">type</code> specifies one of those geometries, an exception will be thrown.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Word.GeometryType.html">GeometryType</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>The geometry type of the shape.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a></td>
      <td><p>The added <a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Word_ShapeCollection_Add_" data-uid="GrapeCity.Documents.Word.ShapeCollection.Add*"></a>
<h4 id="GrapeCity_Documents_Word_ShapeCollection_Add_System_Single_System_Single_GrapeCity_Documents_Word_GeometryType_" data-uid="GrapeCity.Documents.Word.ShapeCollection.Add(System.Single,System.Single,GrapeCity.Documents.Word.GeometryType)">Add(float, float, GeometryType)</h4>
<div class="markdown level1 summary"><p>Inserts a new <a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a> with a specified size into this collection at the <a class="xref" href="GrapeCity.Documents.Word.InsertLocation.html#GrapeCity_Documents_Word_InsertLocation_End">End</a> location.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Shape Add(float width, float height, GeometryType type)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Add(width As Single, height As Single, type As GeometryType) As Shape</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>The shape width.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>The shape height.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Word.GeometryType.html">GeometryType</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>The geometry type of the shape.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a></td>
      <td><p>The added <a class="xref" href="GrapeCity.Documents.Word.Shape.html">Shape</a>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
