.NET APIs to Process Word Documents

Manipulate, Convert and Render Word files to multiple formats as well as Generate Reports without any Microsoft Word dependencies.

  Download Free Trial
Aspose.Words for .NET

Aspose.Words for .NET


Aspose.Words for .NET is an advanced Word document processing API to perform a wide range of document management and manipulation tasks. API supports to generate, modify, convert, render and print documents without utilizing Microsoft Word directly within cross-platform applications. Moreover, API supports all the popular Word Processing file formats as well as allows exporting or converting Word documents to fixed-layout file formats and most commonly used image/multimedia formats.

By integrating API, some of the basic tasks developers can perform such as designing of fully featured Microsoft Word reports having standard mail merge fields, reliable conversion between several popular formats, high fidelity rendering of pages, formatting of all document elements and more.


Advanced .NET Word API Features



Perform mail merge & generate reports


Insert formatted text, paragraphs, images and tables


Fill tables using data from database as well as create and modify table styles


Create mailing labels


Move sections between documents


Mail merge data from multiple tables


Add watermark to document


Format date and numeric fields during mail merge


Join and split documents


Encrypt documents as well as Load encrypted files


Find and replace text, enumerate over document content


Preserve or extract OLE objects and ActiveX controls


Preserve or remove VBA macros


Preserve VBA macros' digital signature


Detect digital signatures


Insert HTML contents


Interconvert document format


Add bookmark in word files at deep level


Convert EquationXML to Office Math


Nested Reports are Supported by LINQ Reporting Engine


Create Snip Corner Rectangle


Save the resources of MHTML document using the "Content-Id" URL Scheme


Show or Hide Comments in Fixed File Format


Show Revisions in Balloons


Write all CSS Declarations of HtmlFixed Documents into Single File

Microsft Word API Latest Features

C# Microsft Word API is continuously enhancing its power by adding more features. Here is a list of few features, added recently.

  • Extract VBA Macros from Word Document.
  • Generate tags for table of contents in PDF.
  • Add a border to a DML shape.
  • DOCX to PDF - additional gaps between characters in the printed text.
  • Change how text is vertically aligned within the Text Box.
  • Formatting the bar chart labels on the Y axis.
  • Add feature to preserve special content of DOC when it is converted to DOCX.
  • Comment and Editable ranges are allowed at Block node level now.
  • Keep indentation of Lists when saving as Text.
  • Preparing a suitable fall back list of free fonts.
  • Improve font substitution API.
  • Error handling in LINQ Reporting.

Popular Document Formats Conversion 

Aspose.Words for .NET allows quick and reliable high-quality conversions to convert documents from any supported format to any other supported format like

  • Any word document including DOC, DOCX to PDF with high fidelity.
  • Any document to XPS format.
  • Any word file to SWF as well as the resultant SWF file contains an embedded viewer allowing the document to be viewed on any device.
  • Conversion to IDPF EPUB formats.
  • Save document to PCL format.

Conversion can be achieved with just two lines of code. It is that simple!

Save document in different formats - C#

// load the file to be converted
var document = new Aspose.Words.Document(dir + "template.doc");
// save in different formats
document.Save(dir + "output.docx", Aspose.Words.SaveFormat.Docx);
document.Save(dir + "output.pdf", Aspose.Words.SaveFormat.Pdf);
document.Save(dir + "output.html", Aspose.Words.SaveFormat.Html);

Render, Print or View Word Documents

Aspose.Words for .NET has its own rendering engine specially designed for rendering & printing with highest of fidelity to the Microsoft Word. Using this feature, developers can render (draw) any document page onto a .NET Graphic object while setting the size and zoom level to create thumbnails for displaying images in the browser. Moreover, API is fully integrated with the .NET printing infrastructure and have the ability to completely customize the process, so that developers can easily print or preview documents within their own applications

Few of the rendering capabilities that API can perform

  • Render pages or full documents to PDF, XPS or SWF.
  • Document pages to images including but limited to PNG, EMF, JPEG, GIF.
  • Individual document shapes into raster or vector images.
  • Render pages or shapes to a .NET Graphics object with transforms.

Programming with Document Object Model

Aspose.Words for .NET allows you to create, build and modify documents - including document formatting with an intuitive document object model that consists of over 100 classes. Some of the manipulation features that API can perform

  • Manipulate all document elements including but not limited to sections, headers, footers, paragraphs, lists, tables, text, fields and much more.
  • Specify detailed formatting for any document element including shapes, text boxes, images, OLE objects and controls.
  • API can easily deal complex and deeply nested expressions containing IF blocks, formulas and other fields.
  • Provides utility features such as joining or splitting documents, copying fragments between documents, protecting and unprotecting documents and a lot more.

Reporting & Mail Merge

Aspose.Words for .NET provides LINQ Reporting Engine to generate documents based upon template documents and data from different sources including databases, XML, JSON, OData, objects of custom CLR types, external documents, and more out of the box. API's Reporting Engine supports

  • Repeatable and conditional document blocks.
  • Dynamically generated charts and images.
  • Insertion of outer documents and HTML blocks into a document.
  • Various types of data sources for the creation of a single document.
  • Built-in support of data relations.
  • WYSIWYG generated document as of the corresponding template.

Additionally, developers can use API's extended syntax for mail merge fields to perform more complex operations during mail merge operations such as inserting images or repeatable regions. The data to drive your reports or mail merges can come from an ADO.NET data table, business objects or from a completely custom data source.

Execute simple mail merge - C#

// load the template containing merged fields
var document = new Aspose.Words.Document(dir + "template.doc");
// fill the fields with user data
    new string[] { "FullName", "Company", "Deparment", "City" },
    new object[] { "John Doe", "Aspose", "Sales", "London" });
// save the result
document.Save(dir + "merged.doc");

Microsoft Office Automation - Not Needed

Aspose.Words for .NET is built using managed code that does not need Microsoft Office or Microsoft Word to be installed on the machine to work with Word document formats. It is a perfect Microsoft Office automation alternative in terms of supported features, security, stability, scalability, speed and price.

What People Are Saying

Don't just take our word for it. See what users have to say about Aspose.Words APIs.

View Case Studies

Support and Learning Resources


Aspose.Words offers individual Word processing APIs for other popular development environments as listed below: