# GrapeCity.Documents.Word.Shape.ApplyPreset

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Word_Shape_ApplyPreset_" data-uid="GrapeCity.Documents.Word.Shape.ApplyPreset*">ApplyPreset Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Word_Shape_ApplyPreset_" data-uid="GrapeCity.Documents.Word.Shape.ApplyPreset*"></a>
<h4 id="GrapeCity_Documents_Word_Shape_ApplyPreset_GrapeCity_Documents_Word_ShapePreset_" data-uid="GrapeCity.Documents.Word.Shape.ApplyPreset(GrapeCity.Documents.Word.ShapePreset)">ApplyPreset(ShapePreset)</h4>
<div class="markdown level1 summary"><p>Applies a predefined fill and outline (<a class="xref" href="GrapeCity.Documents.Word.ShapePreset.html">ShapePreset</a>) to this shape.</p>
<p>Note that <a class="xref" href="GrapeCity.Documents.Word.ShapePreset.html">ShapePreset</a>s cannot be applied to line geometries (see <a class="xref" href="GrapeCity.Documents.Word.Extensions.IsLineGeometry.html#GrapeCity_Documents_Word_Extensions_IsLineGeometry_GrapeCity_Documents_Word_GeometryType_">IsLineGeometry(GeometryType)</a>).
If <a class="xref" href="GrapeCity.Documents.Word.Shape.GeometryType.html#GrapeCity_Documents_Word_Shape_GeometryType">GeometryType</a> of this shape is a line geometry, this method will do nothing and return false.
For line geometries use <a class="xref" href="GrapeCity.Documents.Word.Shape.ApplyPreset.html#GrapeCity_Documents_Word_Shape_ApplyPreset_GrapeCity_Documents_Word_LineShapePreset_">ApplyPreset(LineShapePreset)</a> instead.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool ApplyPreset(ShapePreset preset)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ApplyPreset(preset As ShapePreset) As Boolean</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="GrapeCity.Documents.Word.ShapePreset.html">ShapePreset</a></td>
      <td><span class="parametername">preset</span></td>
      <td><p>The preset to apply.</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="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>True if the preset was applied, false otherwise (if this shape is a line geometry).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Word_Shape_ApplyPreset_" data-uid="GrapeCity.Documents.Word.Shape.ApplyPreset*"></a>
<h4 id="GrapeCity_Documents_Word_Shape_ApplyPreset_GrapeCity_Documents_Word_LineShapePreset_" data-uid="GrapeCity.Documents.Word.Shape.ApplyPreset(GrapeCity.Documents.Word.LineShapePreset)">ApplyPreset(LineShapePreset)</h4>
<div class="markdown level1 summary"><p>Applies a predefined outline (<a class="xref" href="GrapeCity.Documents.Word.LineShapePreset.html">LineShapePreset</a>) to this shape.</p>
<p>Note that <a class="xref" href="GrapeCity.Documents.Word.LineShapePreset.html">LineShapePreset</a>s can only be applied to line geometries (see <a class="xref" href="GrapeCity.Documents.Word.Extensions.IsLineGeometry.html#GrapeCity_Documents_Word_Extensions_IsLineGeometry_GrapeCity_Documents_Word_GeometryType_">IsLineGeometry(GeometryType)</a>).
If <a class="xref" href="GrapeCity.Documents.Word.Shape.GeometryType.html#GrapeCity_Documents_Word_Shape_GeometryType">GeometryType</a> of this shape is not a line geometry, this method will do nothing and return false.
For non-line geometries use <a class="xref" href="GrapeCity.Documents.Word.Shape.ApplyPreset.html#GrapeCity_Documents_Word_Shape_ApplyPreset_GrapeCity_Documents_Word_ShapePreset_">ApplyPreset(ShapePreset)</a> instead.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool ApplyPreset(LineShapePreset preset)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ApplyPreset(preset As LineShapePreset) As Boolean</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="GrapeCity.Documents.Word.LineShapePreset.html">LineShapePreset</a></td>
      <td><span class="parametername">preset</span></td>
      <td><p>The preset to apply.</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="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>True if the preset was applied, false otherwise (if this shape is not a line geometry).</p>
</td>
    </tr>
  </tbody>
</table>
</div>
