Skip to main content Skip to footer
C# .NET Word API Library Examples

Feature-Rich Microsoft Word Document API Library for .NET 6+

Document Solutions for Word (DsWord, previously GcWord) allows you to generate Word documents with speed, memory efficiency with no dependencies.

  • Generate, load, edit, and save Word documents
  • Feature-rich object model based on Microsoft Office API
  • Generate reports from scratch or use report templates
  • Compatible on multiple platforms, such as Windows, macOS, and Linux
  • Deploy to Azure and AWS
Download Free Trial (V 7.0.3)

Overview

A .NET Word API library is a programming interface that allows developers to programmatically create and manipulate Microsoft Word documents at scale. Document Solutions for Word (DsWord) is a solution that allows developers to import/export DOCX files, create reports & templates, and deploy Word documents across desktop and web applications

Benefits of a C# .NET Word API

Fast and Efficient

Save memory and time with the lightweight API architecture. The bigger the document, the faster our API generates complex Word documents.

Extract Data From Word Documents

Parse existing Word documents into databases or generate new Word documents as needed—extraction includes everything from text to paragraphs and images.

Simple, Convenient Object Model

This all-new, feature-rich object model, based on Microsoft Office API, Word JavaScript API, and OpenXML SDK, is straightforward and intuitive.

Full .NET Support for Windows, Linux, and Mac

Develop for any .NET platform or major operating systems with a single code base. Use in your apps for .NET Framework, Mono, Xamarin.iOS, and Xamarin.Android.

Convert Word to PDF and Images

In addition to generating Word documents, you can quickly and easily convert those documents to an image or PDF in code—a top use case for this fast API.

Deploy Apps With Word Docs to the Cloud

Be everywhere with cloud-based deployment. With NuGet and Document Solutions for Word, you can deploy to Azure, AWS, and AWS Lambda.

Generate Data-Bound Word DOCX Reports using a C# .NET Word API.

Generate Data-Bound Word Reports From Word (.docx) Report Templates

Use the comprehensive syntax and API to bind Word documents with data and generate Word .docx reports with advanced layouts.

Learn More View Demos
Work with Shapes in Word DOCX in C# .NET Apps

Create and Modify Flow Charts, Flyers, and Company Logos

Add shapes from 188 Geometry types, 42 Themed shaped styles, and 29 Shape Presets. Create and manipulate existing shapes in Word documents. Apply unified properties on grouped shapes, canvas, and pictures.

Learn More View Demo
Programmatically Find and Replace Text in Word DOCX using C# .NET

Find and Replace Text

Search simple text or find and replace pattern-based text, including regex patterns or unique tokens, and text-based on specific formatting.

View Demo
Add effects to pictures in DOCX files in .NET apps using a Word API

Add Effects to Pictures

Enhance the visual appeal of Word documents by adding picture effects.

Learn More View Demo
Generate Columnar Articles in Word Documents using a .NET API

Generate Columnar Articles in Word Documents

DsWord supports Textboxes to highlight prominent text. You can also arrange your text in columns or sections in Word documents.

View Demo
Generate Multi-Language Word Docs using a C# .NET Word API

Generate Multi-Language Documents

Add text in multiple languages, including Far Eastern, vertical text, and Tate Chu Yoko, using a top-to-bottom, right-to-left page layout to a DOCX file.

View Demo

Add Office Math Content in Word Documents

Read, add, edit, and display Office Math content in a Word document using DsWord’s OMathParagraph and OMath classes.

VIEW DEMO

Our Top C# .NET Word API Features

.NET Word API Library Quick Start Guide

Quick Start

This guide explains how to create a program that uses DsWord to generate and save a DOCX file with the typical "Hello, World!" text to a disk.

LEARN MORE
.NET Word API Library Modification

Load & Modify Existing DOCX Files

Load existing DOCX files and modify formatting, change theme colors, split or merge documents, copy paragraphs, and much more.

LEARN MORE

Find and Replace

Easily use C#/VB .NET code to find text in DOCX files, as well as replace all occurrences of text throughout the document, and insert text at specific locations. 

LEARN MORE
.NET Word API Library File Formats

Popular Word Document Formats

Create and work with a variety of popular Word documents. Input/Output includes DOCX, DOTM, DOCM, and DOTX. Output includes PDF and PDF/A.

LEARN MORE

Styles

Work with built-in and user-defined styles that demonstrate common, table, list, character, and paragraph styles.

LEARN MORE
.NET Word API Library Content Editing

Content

Add and edit content and work with styles including word wrapping, tables, paragraph styles, image placement, and inline text options.

LEARN MORE

.NET Word API Library Modify Elements

Insert, Modify, and Remove Document Elements

Insert, edit, and remove paragraphs, text, sections, images, tables, headers, footers, footnotes, endnotes, comments, bullet lists, numbered lists, fields, hyperlinks, bookmarks, and page breaks.

LEARN MORE
.NET Word API Library List Templates

Templates

Create lists with built-in templates with formatting similar to lists in Microsoft Word, including level and level number.



LEARN MORE
C# .NET Word API Library report templates

Word (.docx) Report Templates

Use report templates to generate contracts, leases, consulting agreements, and more using data-bound Word .docx documents.


Learn More
.NET C# Word API Library Tables

Tables

Work with tables that contain grid spans, alternative rows, conditional styles, and simple or nested groups.


LEARN MORE
.NET Word API Library Fields

Fields

Easily add fields to a document for a formatted date and/or time, hyperlinks to web content or other documents, and custom fields that modify the document content.

LEARN MORE
.NET C# Word API Library Shapes

Shapes

Add and edit shapes from a wide range of geometric shapes, shape presets, and theme-based shape styles in Word documents.

LEARN MORE

.NET Word API Library Content Controls

Content

Add and edit content and work with styles for word wrapping, tables, and different paragraph styles. From basic adding, removing, editing, and content formatting to image placement and inline text options, DsWord can do it all.

LEARN MORE
Add Effects to Word DOCX using C# .NET Word API

Effects

Customize the look of your content in MS Word files and apply effects on Shapes and Text in Word .docx files.

 

 

Learn More
Use .NET Word API to create large documents (100+ paragraphs)

Large Documents

Review samples that create large documents of 100+ paragraphs.




LEARN MORE
.NET Word API Library Mail Merge Bookmarks

Mail Merge

Implement mail merge using bookmarks in an MS Word DOCX with only a few lines of code and no dependency on Word.



LEARN MORE
.NET Word API Library Documents Using Multiple Features

Fancy Documents

Showcase multiple features within one document by utilizing fancy document layouts–showcasing several DsWord features.


LEARN MORE
.NET Word API Library Miscellaneous

Miscellaneous

Learn how to work with content controls, custom XML parts, glossary documents, style sources, sample paragraphs, JsFramework excerpts, and the Procurement Letter template in Word documents.

LEARN MORE
Embed Fonts in MS Word Documents using a .NET Word API

Embed Fonts

Define and embed fonts in MS Word documents to render the document correctly, even if the font is not available on the system.


LEARN MORE
Programmatically Convert Markdown to Word in .NET Apps using a Word API

Convert Markdown .md to Word .docx (Sample)

Full source code available to parse Markdown .md file using Markdig markdown processor (BSD 2-Clause license) and convert to Word .docx file using DsWord.

Learn More
Convert a Word DOCX to a Password Protected PDF in a .NET App

Password protect the exported PDF

Allow users to specify security-related features (e.g. password, limit copying, etc.) when converting Word .docx file to PDF.

 

Learn More
Programmatically Set/Apply Linked Styles in Word Documents in .NET apps

Linked Styles

Apply linked style to both paragraphs or runs in Word documents.


Learn More
Add Office Math Content in Word Documents - .NET Word DOCX API

Add Office Math Content in Word Documents

Add Office Math content to Word document. Also supported is Office Math to MathML conversion and vice versa.

Learn More

Explore the Advanced Features of a .NET Word API

Your full-fledged ASP.NET Core sample browser includes all the major features, real-time DOCX, PDF, image files, and use cases. Download individual .NET Core samples that can run as a standalone. The demos also include full sample code with comments along every step to help you onboard quickly with Document Solutions for Word.

Try full demo

Trusted by the World's Leading Companies

"The speed to build what we needed and the level of ease of use of controls are why we chose GrapeCity [now known as MESCIUS]. It was a perfect fit."

SPIRO SKIAS - CGI