# GrapeCity.Documents.Word.Shape.AddTextFrame

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Word_Shape_AddTextFrame_" data-uid="GrapeCity.Documents.Word.Shape.AddTextFrame*">AddTextFrame Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Word_Shape_AddTextFrame_" data-uid="GrapeCity.Documents.Word.Shape.AddTextFrame*"></a>
<h4 id="GrapeCity_Documents_Word_Shape_AddTextFrame_System_String_GrapeCity_Documents_Word_Style_" data-uid="GrapeCity.Documents.Word.Shape.AddTextFrame(System.String,GrapeCity.Documents.Word.Style)">AddTextFrame(string, Style)</h4>
<div class="markdown level1 summary"><p>Adds a text frame to this shape.</p>
<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 <a class="xref" href="GrapeCity.Documents.Word.Shape.GeometryType.html#GrapeCity_Documents_Word_Shape_GeometryType">GeometryType</a> of this shape does not support text frames, an exception will be thrown.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public TextFrame AddTextFrame(string text = null, Style style = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function AddTextFrame(Optional text As String = Nothing, Optional style As Style = Nothing) As TextFrame</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.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>The text frame content.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Word.Style.html">Style</a></td>
      <td><span class="parametername">style</span></td>
      <td><p>The text frame content style.</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.TextFrame.html">TextFrame</a></td>
      <td><p>The added <a class="xref" href="GrapeCity.Documents.Word.Shape.TextFrame.html#GrapeCity_Documents_Word_Shape_TextFrame">TextFrame</a>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
