Aspose.Words  Cloud SDK for .NET

Work with Word Documents in .NET

Open, create, edit, merge, split, compare and convert a Word document in .NET

Get Started
  
 

Open, generate, edit, split, merge, compare and convert a Word document in C#. It's easy for C# developers to manipulate Microsoft Word documents.

Simply integrate our Cloud API into your applications to get full-featured Word API that allows you to work, manipulate and integrate documents into your C#, ASP.NET and all other .NET apps including web, mobile, desktop, gaming, IoT, cloud, and microservices.

The main usage of this library is to create, open, edit, split, convert documents in different file formats such as DOCX, HTML, PDF, DOC, JPG, etc. Cloud API gives you a library to do tasks programmatically in C# such as:

  • Add text in a Word document.
  • Search and replace text in Word documents.
  • Insert a table of contents.
  • Generate reports and mail merge.
  • Insert images into files.
  • Add watermark.

This API is the most agile method for a .NET developer to speed up the process of working with documents while developing a .NET app. API takes care of low-level details to make requests and handle responses. And this lets you focus on writing code specific to your particular project.

Note: Install NuGet package to start working with documents.

Advanced Word Document Processing Features

Merge multiple Word documents

Split all or specific pages of a Word document

Convert Word documents to different formats

Manipulate document properties

Execute simple to complex mail merge

Execute mail merge template

Insert scaled images on merge fields

Insert a page number field into Word documents

Insert or edit watermark in Word documents

Find or replace text in Word documents

Password protect Word documents or update document protection

Load & convert PDF documents to Word formats including DOC & DOCX

Word Cloud Features for C#

  • Open, create and edit paragraphs and text.
  • Open, create and edit images, text boxes and shapes.
  • Open, create and edit tables including rows and cells.
  • Open, create and edit fields, form fields, hyperlinks and bookmarks.
  • Open, create and edit document sections, headers and footers.
  • Open, create and edit footnotes, endnotes and comments.
  • Convert documents between several popular file formats.
  • Load and save HTML/XHTML.
  • Render individual shapes from a document into raster or vector images.
  • Add and update all character formatting including fonts, colors, effects, borders, shading, etc.

Edit a Word Documents in the Cloud with C#

Cloud API provides a solution to edit a Word document with C# and all other .NET apps including web, mobile, desktop, gaming, IoT, cloud, and microservices. Using C#, you can edit an existing Word document to correct spellings or add new content to a file. Also, it's used to access and to modify document’s elements as well as their formatting.
Assume that you want to update the text in first paragraph of first section in your Word document that you have created before. So, you will need to specify the index of the first section and the first paragraph.

Create a New Word Document in the Cloud via C#

Cloud API includes all the methods and properties to create a Word document from scratch. It allows you to insert elements such as text, paragraphs, checkboxes, tables, lists, images and all other objects that a Word document can contain.

Parse a Word Document using C#

Parse a Word document by extracting a document’s content as a plain text and save it into a .txt file.

Working with Text in Word via .NET

API allows you to find and replace text in DOCX and other documents in .NET.
It has string searching and string matching algorithms to find all appearances of a character pattern, to find a place where one or many patterns are found within a larger string or text.
In other words, it finds substring matches inside a given string and finding dictionary strings that match the pattern defined by a regular expression.
You can replace all occurrences of a specified string with another string in .NET.

Convert a Word Document with Cloud API

Along with the features to create and manipulate Word documents, cloud API allows you to convert a Word document from DOCX to another file format including (but not limited to) HTML, PDF, XPS, EPUB and image formats such as PNG, JPEG or BMP.

Split a Word file into multiple PDF Files

  • Divide multi-page Word documents into separate Word documents.
  • Split by page number, odd/even pages and by page range.
  • Keep style and layout of the root document.

Rendering Word Documents in the Cloud

Rendering is used to define the method of converting a document into a paginated file format.
Our API allows you to perform the following:

  • Render a page to a specified format.
  • Render a table to a specified format.
  • Render a paragraph to a specified format.
  • Render drawing objects (e.g. oval, rectangle, line) to a specified format.
  • Render math objects to a specified format.
  • Render pages of a Word document to image formats including PNG, EMF, JPEG and GIF.

Swagger UI

You can use Swagger UI to visualize and interact with APIs resources.

Convert PDF to Word in the Cloud with C#

The following code sample shows how to convert PDF to DOCX in the Cloud and save the result to a local file:

Convert Word documents to PDF - Dart

var appKey = "##################";
var appSid = "####-####-####-####-####";
var wordsApi = new WordsApi(appKey, appSid);

var request = new ConvertDocumentRequest(File.OpenRead("sample.pdf"), "docx");
var result = wordsApi.ConvertDocument(request);
using (var file = new FileStream("sample.docx", FileMode.Create, FileAccess.Write))
{
    result.CopyTo(file);
}

How to open and edit a DOCX document in C#

  1. Install NuGet package or use the direct download.
  2. Go to the Aspose Cloud Dashboard.
  3. Create a new Account to access all applications and services or Sign In to your existing account.
  4. Click on Applications in the left menu to get Client Id and Client Secret.
  5. Upload a DOCX file to the Cloud Storage or use directly in the request body.
  6. Check Developer Guide to edit a DOCX file in C#.
  

Support and Learning Resources