Guide for C#
Core Document Formats
Additional Features

C# Word - Merge & Split Word in C#.NET

C#.NET Word Merging & Splitting Control for .NET Processing Application

Visual C#
Home > .NET Imaging SDK > C# > Merge and Split Document(s)
If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!

C#.NET MS Word Merging & Splitting
Microsoft Word document is a commonly-used word & text processing file. In order to help developers process & edit MS Word document at a document level, for example, how to combine several Word documents to form a larger Word file or how to divide source MS Word file into several smaller documents, RasterEdge designs this C#.NET MS Word merger & splitter control SDK.
Related .net document control helps:
asp.net edit pdf page using c#: ASP.NET PDF Pages Edit Control: add, remove, sort, replace PDF pages online using C#
asp.net mvc excel viewer: ASP.NET Excel Viewer in C# Control (MVC & WebForms): view Office Excel document in web browser.
c# asp.net dicom viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net pdf document viewer c#: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
asp.net edit pdf image using c#: ASP.NET PDF Image Edit Control: online insert, edit PDF images in C#
asp.net edit pdf text using c#: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net mvc pdf editor using c#: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
This C#.NET MS Word document merger & splitter control add-on is a multi-featured .NET solution, which owns following functions.
  • High-quality VB.NET Word merging & splitting control add-on that is designed specifically for .NET developers
  • Allow C#.NET developers to assemble and disassemble MS Word document file in both web and Windows applications
  • Able to merge multiple Word files and save combined Word document as stream or new Word file using C#.NET
  • Offer mature API for C#.NET programmers to divide source Word file by a certain page index
  • Able to merge or split MS Word file in .NET Framework 2.0, 3.0, 3.5, 4.0 & 4.5 using C# code
From this online article, you will know C#.NET MS Word document merging and splitting control add-on from following several aspects.
  • Brief introduction to programming classes that will be used in C#.NET MS Word merging and splitting application
  • How to combine MS Word documents in C#.NET Framework application
  • How to split source MS Word file to sub-documents using sample C# code
  • RasterEdge C#.NET MS Word (DOCX) document merger & splitter control add-on
C# DOCXPage & DOCXDocument Classes Overview
To help developers process & manipulate MS Word document (Word version 2007) in an easy way, RasterEdge expressly defines several programming classes for better editing Word file.
  • DOCXPage: RasterEdge represents a Word page as a DOCXPage object, which is derived from super class REPage.
  • DOCXDocument: A whole Word document is represented as DOCXDocument, which contains all Word pages information.
How to Merge MS Word Using C#.NET
Mature interfaces and detailed demo code are provided here to help developers combine & merge multiple MS Word documents into one Word file using C#.NET Word merger control add-on.

C#.NET APIs to Combine & Assemble MS Word Files

In this part, we list four APIs for Word combination. The difference of these Word merging APIs lies in the output form of combined Word document. Two of them will create a merged document which is saved as stream and the other two will store combined file as a new Word document file.
void DOCXDocument.Combine(List<BaseDocument> source, Stream destn);
void DOCXDocument.Combine(List<BaseDocument> source, String destn);
void DOCXDocument.Combine(List<String> source, Stream destn);
void DOCXDocument.Combine(List<String> source, Sting destn);

C#.NET Demo Codes to Merge Multiple Word Documents

Although you can merge two Word document files by a copy and paste method, it will be time-consuming if the target Word documents are all over 50+ pages. In this section, detailed C#.NET programming examples are listed here for assembling a list of Word files into one Word document.
public void CombineDocumentsToStream(MemoryStream s, List<DOCXDocument> docList)
{
DOCXDocument.Combine(docList, s);
}
public void CombineDocumentAndSaveItToFile(List<DOCXDocument> docList, String destnPath)
{
DOCXDocument.Combine(docList, destnPath);
}
How to Split MS Word Using C#.NET
As is said above, this C#.NET Word merger & splitter control add-on allows developers to divide source MS Word file into two sub-documents by a given page index. For example, if you specify the Word splitting page index as 4, this C#.NET Word merger & splitter library toolkit will split source Word file into two Word documents. One Word file contains the first five original Word pages and the other one contains the rest original Word pages.

C#.NET APIs to Disassemble MS Word Document

void DOCXDocument.SplitDocument(Stream source, int index, List<String> destns);
void DOCXDocument.SplitDocument(String source, int index, List<String> destns);
void DOCXDocument.SplitDocument(Stream source, int index, List<Stream> destns);
void DOCXDocument.SplitDocument(int index, String source, List<Stream> destns);

C#.NET Sample Code to Separate Word File by Page Index

public void splitDOCXDocument(String sourceFilePath, int pageIdx, List<String> destnsPath)
{
DOCXDocument.SplitDocument(sourceFilePath, pageIdx, destnsPath);
}
C#.NET Word Merger & Splitter Control Add-on FAQs
Q: Is this C#.NET Word merger & splitter control add-on suitable for processing Word files that are created by Microsoft Office tool version 2003?
A: Sorry, Word file of version 2003 is currently not supported.


Recommend this to Google+


RasterEdge.com is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster Edge.com