Merge Word Documents with NET REST API

This article defines how to merge Word documents with NET REST API. We will use Aspose.Words for .NET Cloud SDK to combine Word files with C# Low Code API and follow the given steps to develop the complete application. You will read as many files as required for merging with the source Word file and download the resultant Word file at the end.

Prerequisite

Steps to Combine Word Documents with C# Low Code API

  1. Create the WordsApi object using the client ID and secret
  2. Instantiate the AppendDocumentRequest object and set the input source Word file
  3. Read the input Word file into the memory stream and upload the file
  4. Use the DocumentEntryList by reading the multiple Word files to append
  5. Set the destination file name and call the WordsApi.AppendDocument method for combining the files
  6. Download the destination file from the cloud and save it on the disk

The aforementioned steps combine multiple Word documents with C# Low Code API. Commence the process by creating the WordsApi class object and uploading the source Word file to the Cloud where you want to merge other Word files. Read multiple Word files, set the destination Word file name, and call the AppendDocument() method to combine the Word files in the cloud before downloading the output.

Code to Merge Word Files Online with C# REST API

This code demonstrates how to merge Word documents online with NET REST API. It uses the WordsApi class to upload the source Word file, merges multiple files using the AppendDocument() method, and downloads the resultant Word file. Use the DocumentEntryList to add multiple files for merging by providing the import format mode and individual file contents.

This article has taught us the process to merge Word files with C# REST API. If you want to add/update Word file properties, read the following article: Change properties of Word document with NET REST API.

 English