# GrapeCity.Documents.Word.GcWordDocument.SplitDocument

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Word_GcWordDocument_SplitDocument_" data-uid="GrapeCity.Documents.Word.GcWordDocument.SplitDocument*">SplitDocument Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Word_GcWordDocument_SplitDocument_" data-uid="GrapeCity.Documents.Word.GcWordDocument.SplitDocument*"></a>
<h4 id="GrapeCity_Documents_Word_GcWordDocument_SplitDocument_System_ValueTuple_GrapeCity_Documents_Word_RangeBase_GrapeCity_Documents_Word_FormattingCopyStrategy____" data-uid="GrapeCity.Documents.Word.GcWordDocument.SplitDocument(System.ValueTuple{GrapeCity.Documents.Word.RangeBase,GrapeCity.Documents.Word.FormattingCopyStrategy}[])">SplitDocument(params (RangeBase splitRange, FormattingCopyStrategy copyStrategy)[])</h4>
<div class="markdown level1 summary"><p>Splits the current document into several documents based on specified ranges and formatting copy strategies.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public IEnumerable&lt;GcWordDocument&gt; SplitDocument(params (RangeBase splitRange, FormattingCopyStrategy copyStrategy)[] splitRanges)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SplitDocument(ParamArray splitRanges As (splitRange As RangeBase, copyStrategy As FormattingCopyStrategy)()) As IEnumerable(Of GcWordDocument)</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.RangeBase.html">RangeBase</a> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetuple-grapecity.documents.word.rangebase,grapecity.documents.word.formattingcopystrategy-.splitrange">splitRange</a>, <a class="xref" href="GrapeCity.Documents.Word.FormattingCopyStrategy.html">FormattingCopyStrategy</a> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetuple-grapecity.documents.word.rangebase,grapecity.documents.word.formattingcopystrategy-.copystrategy">copyStrategy</a>)[]</td>
      <td><span class="parametername">splitRanges</span></td>
      <td><p>An array of pairs of ranges in the current document, and corresponding formatting copy strategies.</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.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="GrapeCity.Documents.Word.GcWordDocument.html">GcWordDocument</a>&gt;</td>
      <td><p>A collection of documents created according to the specified <code class="paramref">splitRanges</code>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Word_GcWordDocument_SplitDocument_" data-uid="GrapeCity.Documents.Word.GcWordDocument.SplitDocument*"></a>
<h4 id="GrapeCity_Documents_Word_GcWordDocument_SplitDocument_GrapeCity_Documents_Word_FormattingCopyStrategy_GrapeCity_Documents_Word_RangeBase___" data-uid="GrapeCity.Documents.Word.GcWordDocument.SplitDocument(GrapeCity.Documents.Word.FormattingCopyStrategy,GrapeCity.Documents.Word.RangeBase[])">SplitDocument(FormattingCopyStrategy, params RangeBase[])</h4>
<div class="markdown level1 summary"><p>Splits the current document into several documents based on specified ranges and a common formatting copy strategy.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public IEnumerable&lt;GcWordDocument&gt; SplitDocument(FormattingCopyStrategy copyStrategy, params RangeBase[] splitRanges)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SplitDocument(copyStrategy As FormattingCopyStrategy, ParamArray splitRanges As RangeBase()) As IEnumerable(Of GcWordDocument)</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.FormattingCopyStrategy.html">FormattingCopyStrategy</a></td>
      <td><span class="parametername">copyStrategy</span></td>
      <td><p>The formatting copy strategy to use.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Word.RangeBase.html">RangeBase</a>[]</td>
      <td><span class="parametername">splitRanges</span></td>
      <td><p>An array of ranges in the current document.</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.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="GrapeCity.Documents.Word.GcWordDocument.html">GcWordDocument</a>&gt;</td>
      <td><p>A collection of documents created according to the specified <code class="paramref">splitRanges</code>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Word_GcWordDocument_SplitDocument_" data-uid="GrapeCity.Documents.Word.GcWordDocument.SplitDocument*"></a>
<h4 id="GrapeCity_Documents_Word_GcWordDocument_SplitDocument_GrapeCity_Documents_Word_RangeBase___" data-uid="GrapeCity.Documents.Word.GcWordDocument.SplitDocument(GrapeCity.Documents.Word.RangeBase[])">SplitDocument(params RangeBase[])</h4>
<div class="markdown level1 summary"><p>Splits the current document into several documents based on specified ranges,
using <a class="xref" href="GrapeCity.Documents.Word.FormattingCopyStrategy.html#GrapeCity_Documents_Word_FormattingCopyStrategy_Copy">Copy</a> to preserve formatting of the source document.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public IEnumerable&lt;GcWordDocument&gt; SplitDocument(params RangeBase[] splitRanges)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SplitDocument(ParamArray splitRanges As RangeBase()) As IEnumerable(Of GcWordDocument)</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.RangeBase.html">RangeBase</a>[]</td>
      <td><span class="parametername">splitRanges</span></td>
      <td><p>An array of ranges in the current document.</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.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="GrapeCity.Documents.Word.GcWordDocument.html">GcWordDocument</a>&gt;</td>
      <td><p>A collection of documents created according to the specified <code class="paramref">splitRanges</code>.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
