Skip to main content
Any Framework

Syncfusion Word library is feature-rich and high-performance .NET Word library that allows you to create, manipulate and convert Word documents (DOC, DOT, DOCM, DOTM, DOCX, DOTX, RTF, and WordML), TXT, and HTML files.

Published
Jan 18, 2022
4y ago
Total Downloads
917.2K
917,193

Install

dotnet add package Syncfusion.DocIO.AspNet.Mvc4 --version 19.4.0.43

No framework information available.

README

The Syncfusion .NET Word library (Essential DocIO) allows you to add advanced Word document processing functionalities to any ASP.NET MVC application and does not require Microsoft Word application to be installed in the machine. It is a non-UI component that provides a full-fledged document instance model similar to the Microsoft Office COM libraries to iterate with the document elements explicitly and perform necessary manipulation. Using this library, you can create, read, edit and convert Word documents programmatically.

Key Features

  • Support to create Word document from scratch.
  • Support to open (read), modify and save existing Word documents.
  • Advanced Mail merge support with different data sources.
  • Ability to create or edit Word 97-2003 and later version documents (DOCX), and convert them to commonly used file formats such as RTF, WordML, TXT, HTML and vice versa.
  • Ability to export a Word document as an Image and PDF file.
  • Ability to create and manipulate charts, Shapes, and Group shape in DOCX and WordML format documents.
  • Ability to read and write Built-In and Custom Document Properties.
  • Ability to find and replace text with its original formatting.
  • Ability to insert Bookmarks and navigate corresponding bookmarks to insert, replace, and delete content.
  • Support to insert and edit the form fields.
  • Support to protect the document to restrict access to the elements present within the document.
  • Ability to encrypt and decrypt Word documents.
  • Support to insert and extract OLE objects.
  • Support to run the DocIO applications in multi-thread and its thread safe.

Getting Started

You can fetch the Syncfusion ASP.NET MVC Word library NuGet by simply running Install-Package Syncfusion.DocIO.AspNet.Mvc4 from the Package Manager Console in Visual Studio.

You can also try some code examples of common use cases from our GitHub Repository.

Create a Word Document programmatically using C#

The following code example illustrates how to create a Word document.

//Creates a new instance of WordDocument (Empty Word Document).
WordDocument document = new WordDocument();
//Adds a section and a paragraph to the document.
document.EnsureMinimal();
//Appends text to the last paragraph of the document.
document.LastParagraph.AppendText("Hello World");
//Saves the Word document.
document.Save("Sample.docx", FormatType.Docx);
//Closes the document.
document.Close();

Manipulate the Word document programmatically using C#

The following code example illustrates how to manipulate the Word document.

//Opens an existing Word document.
WordDocument document = new WordDocument("Template.docx", FormatType.Automatic);
//To-Do some manipulation.
//To-Do some manipulation.
//Saves the Word document.
document.Save("Sample.docx", FormatType.Docx);
//Closes the document.
document.Close();

Supported File Formats

  • Creates, reads, and edits popular text file formats like DOC, DOT, DOCM, DOTM, DOCX, DOTX, HTML, RTF, TXT, and XML (WordML).
  • Converts Word documents also to PDF, and ODT files.

Compatible Microsoft Word Versions

  • Microsoft Word 97-2003
  • Microsoft Word 2007
  • Microsoft Word 2010
  • Microsoft Word 2013
  • Microsoft Word 2016
  • Microsoft Word 2019

Resources

Support and feedback

License

This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this component, is subject to the terms and conditions of Syncfusion's EULA. You can purchase a licnense here or start a free 30-day trial here.

About Syncfusion

Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion has more than 26,000+ customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies.

Today, we provide 1600+ components and frameworks for web (Blazor, ASP.NET Core, ASP.NET MVC, ASP.NET WebForms, JavaScript, Angular, React, Vue, and Flutter), mobile (Xamarin, Flutter, UWP, and JavaScript), and desktop development (WinForms, WPF, WinUI, Flutter and UWP). We provide ready-to-deploy enterprise software for dashboards, reports, data integration, and big data processing. Many customers have saved millions in licensing fees by deploying our software.


[email protected] | www.syncfusion.com | Toll Free: 1-888-9 DOTNET

Changes from Previous Version

No structural changes between v19.4.0.42 and v19.4.0.43.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.