GroupDocs.Merger for .NET

Split WORD files

GroupDocs.Merger for .NET enhances .NET applications with advanced document processing features. Easily split WORD files and work with various popular business formats.

How to split WORD files

With GroupDocs.Merger, you can split WORD documents and save selected pages as a new file. Enhance document processing in your .NET applications.

  1. Specify the source path of the WORD file.
  2. Define the output file path for the split document.
  3. Configure the split operation settings.
  4. Execute the split operation and save the file.
// Load the source file into Merger
using (Merger merger = new Merger("document.docx"))
{
    // Specify the output file path
    String outPath = "result.docx";

    // Configure split options
    SplitOptions splitOptions = new SplitOptions(outPath, new int[] { 1 });

    // Execute the split operation
    merger.Split(splitOptions);
}
dotnet add package GroupDocs.Merger
click to copy
copied
More examples Documentation

Advanced document management

GroupDocs.Merger for .NET offers a complete set of tools for efficiently processing over 50 commonly used business file formats.

Key capabilities of GroupDocs.Merger

Merge multiple file formats

Combine PDFs, Word documents, presentations, spreadsheets, Visio diagrams, images, and archives. Customize the merging process for precise results.

Organize document pages

Rearrange pages by moving, swapping, or deleting them to improve document structure.

Adjust page layout

Rotate pages to any angle or switch between portrait and landscape orientations.

Extract pages as separate files

Select specific pages or a page range and save them as a new file in a chosen location.

Split WORD document and save even-numbered pages

This example shows how to split a WORD document and save all even-numbered pages as a separate file.

C#

// Load the source file into the constructor
using (Merger merger = new Merger("document.docx"))
{
    // Specify the output file path
    String outPath = "result.docx";

    // Retrieve the total number of pages
    IDocumentInfo info = merger.GetDocumentInfo();
    int lastPage = info.PageCount;

    // Define split options for even-numbered pages
    RangeMode rangeMode = RangeMode.EvenPages;
    SplitOptions splitOptions = new SplitOptions(outPath, 1, lastPage, rangeMode);

    // Execute the split operation and save the file
    merger.Split(splitOptions);
}
dotnet add package GroupDocs.Merger
click to copy
copied
More examples Documentation

About GroupDocs.Merger

GroupDocs.Merger for .NET is a powerful document processing library that supports over 50 file formats, including PDF, Word, Excel, PowerPoint, Visio, images, and archives. It enables merging, splitting, extracting, moving, swapping, and deleting pages to simplify document management.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Merger for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Key features

Explore the powerful document processing capabilities of our library.

Split multiple file formats

GroupDocs.Merger supports over 50 file types, making document modification quick and efficient.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English