Guide for VB.NET
Core Document Formats
Additional Features

VB.NET Word - Tutorial for Word Merging or Splitting

How to Combine or Split Source Word DOCX Document(s) Using VB.NET Code

VB.NET
Home > .NET Imaging SDK > VB.NET > Merge and Split Document(s)
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

This VB.NET Word merging & splitting tutorial is mainly used to answer two questions: how to merge individual or multiple Word documents into one Word file using VB.NET code and how to split one Word file into several smaller Word documents programmatically. But before giving you the detailed .NET solution, we recommend you to look at following related questions first.
Related .net document control helps:
document viewer asp.net c#: ASP.NET Document Viewer using C#: Open, View, Annotate, Redact, Convert document files in ASP.NET using C#, HTML5, JQuer...
powerpoint viewer asp.net mvc: ASP.NET PowerPoint Document Viewer Control (MVC & WebForms): view ppt, pptx files online in C# using ASP.NET
asp.net pdf document viewer: ASP.NET PDF Document Viewer in C#: open, display, view, annotate, redact Adobe PDF files online in ASP.NET MVC & WebForm...
mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC
asp.net dicom web viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET
asp.net image viewer jquery: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery
asp.net view text file: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET
  • How to install this VB.NET Word merging & splitting control add-on into VB.NET application?
  • What VB.NET API and demo code can I use to combine different Word files into one Word document?
  • What VB.NET API and sample code can I use to separate one Word file into smaller Word documents?
  • Why do I need to choose RasterEdge VB.NET Word merger & splitter library SDK?
How to Install
One feature of this VB.NET Word merger and splitter control add-on is its easy installation. All mature Word merging & splitting APIs are encoded into several RasterEdge compact dlls (Core DLLs & Word Add-On DLL) which allow VB.NET developers to integrate advanced Word combining & disassembling features into their VB.NET developing projects by adding references directly and without any registration code.
In the process of installing this VB.NET Word merging and splitting control SDK, please remember to activate your license key first and place it at the right project folder. Besides, to make this VB.NET Word merging and splitting control add-on work successfully at your VB.NET doc imaging application, please make sure that you have installed .NET Framework 2.0 or later versions and Microsoft Visual Studio 2005 or greater versions.
How to Merge
This VB.NET Word merging and splitting library allows you to combine one or a list of Word documents into one Word file. Before using following VB.NET Word merging or splitting APIs, please read the instructions about these two programming classes.
  • DOCXDocument: RasterEdge SDK treats each Word document as a DOCXDocument object.
  • DOCXPage: One Word page contained in a DOCXDocument instance is represented as a DOCXPage object.

APIs for Word Document Combination

Following APIs allows VB.NET developers to combine multiple Word files into one document which can be stored in the form of memory stream or .docx file.
Private Sub Combine(source As List(Of BaseDocument), destn As Stream) Implements DOCXDocument.Combine
End Sub
Private Sub Combine(source As List(Of BaseDocument), destn As [String]) Implements DOCXDocument.Combine
End Sub
Private Sub Combine(source As List(Of [String]), destn As Stream) Implements DOCXDocument.Combine
End Sub
Private Sub Combine(source As List(Of [String]), destn As Sting) Implements DOCXDocument.Combine
End Sub

Sample Codes to Combine Word Files

Public Sub CombineDocumentsToStream(s As MemoryStream, docList As List(Of DOCXDocument))
DOCXDocument.Combine(docList, s)
End Sub
Public Sub CombineDocumentAndSaveItToFile(docList As List(Of DOCXDocument), destnPath As [String])
DOCXDocument.Combine(docList, destnPath)
End Sub
How to Split
Here we just briefly illustrate the splitting process of this VB.NET Word merger & splitter plug-in: decode source Word file into a DOCXDocument object, divide created DOCXDocument instance into two Word sub-documents at a given page index using SplitDocument method and encode created sub-documents into stream or .docx Word format in VB.NET program.

APIs for Splitting Word Document

Private Sub SplitDocument(source As Stream, index As Integer, destns As List(Of [String])) Implements DOCXDocument.SplitDocument
End Sub
Private Sub SplitDocument(source As [String], index As Integer, destns As List(Of [String])) Implements DOCXDocument.SplitDocument
End Sub
Private Sub SplitDocument(source As Stream, index As Integer, destns As List(Of Stream)) Implements DOCXDocument.SplitDocument
End Sub
Private Sub SplitDocument(index As Integer, source As [String], destns As List(Of Stream)) Implements DOCXDocument.SplitDocument
End Sub

Demo Codes to Split Word File

Public Sub splitDOCXDocument(sourceFilePath As [String], pageIdx As Integer, destnsPath As List(Of [String]))
DOCXDocument.SplitDocument(sourceFilePath, pageIdx, destnsPath)
End Sub
Why to Use
To help you have a comprehensive overview of this VB.NET Word merger & splitter control add-on, we here expressly list its main features.

Merge or Split Word File(s) Created by Multiple Microsoft Word Versions

This VB.NET Word merging & splitting control SDK allows developers to merge or split Word file(s) that end(s) with .docx file suffix.

Compatible with Several .NET Developing Platforms

This VB.NET Word merger & splitter library is able to assemble & disassemble Word file in both .NET Windows and web applications.

Support Merging and Splitting Word File Using C# Code

If you want to merge or separate Word file(s) using Visual C# code, this VB.NET Word merger & splitter SDK is also suitable.

Merge Word Files or Split Word in Batch Mode

This VB.NET Word combining and splitting add-on allows developers to merge or separate Word file in batch mode within seconds.

Able to Conduct Other Word Page Processing Functions

If integrated with other RasterEdge Word processing and editing controls, this VB.NET Word merger and splitter library SDK can do more Word processing functions at page level.


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