Merge Word documents

GroupDocs.Merger provides an easy way to merge Microsoft Word documents of DOC, DOCX, DOCM, DOT, DOTX, DOTM, RTF formats and Open Document formats like ODT, OTT etc. It takes just single line of code to append one document to another preserving all content - page setup, headers and footers, formatting, styles and other content. There is no third-party applications required (like Microsoft Word and Open Office). 
GroupDocs.Merger API provides different overloads of Join method to combine presentations with the source document loaded into Merger object. 

  • Join(String) - allows to merge document provided via file path on a local disk; 
  • Join(Stream) - provides an ability to combine documents loaded from any source - memory stream, remote URL etc.;
  • Join(String, IJoinOptions) - is used for merging specific pages for document stored at local disk; 
  • Join(Stream, IJoinOptions) - used for merging specific pages from document provided as a stream.

This code sample shows how to merge Microsoft Word documents:

using (Merger merger = new Merger(@"c:\document1.docx"))
{
    merger.Join(@"c:\document2.docx");
    merger.Save(@"c:\merged.docx");
}

More resources

Advanced Usage Topics 

To learn more about document merging features, please refer the advanced usage section.

GitHub Examples 

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full featured .NET library we provide simple, but powerful free Apps.
You are welcome to merge your documents with our free online GroupDocs Merger App.