Back to Devexpress

Get Started - Create a Word Document

officefileapi-16785-word-processing-document-api-getting-started.md

latest1.5 KB
Original Source

Get Started - Create a Word Document

  • May 07, 2025
  • 3 minutes to read

This tutorial describes how to get started with the Word Processing Document API for .NET and .NET Framework.

Create a .NET Application

  1. Start Visual Studio and create a new Console App project.

  2. Install the DevExpress.Document.Processor NuGet package.

  3. Paste the code below in the Program.cs file (or the Program.vb file for Visual Basic). This example creates and saves the Test.docx file and opens it in the default application registered for this file type.

  4. Run the project. The generated file appears as follows (the document is opened in Microsoft® Word®).

Create a .NET Framework Application

  1. Start Visual Studio and create a new Console App (.NET Framework) project.

  2. Install the DevExpress.RichEdit.Core NuGet package or add references to the following libraries (if you have the DevExpress Unified Component Installer installed on your machine):

  3. Paste the code from below in the Main method of the Program.cs file (or the Main procedure of the Module1.vb file for Visual Basic). This example creates and saves the Test.docx file, and opens it in the default application registered for this file type.

  4. Run the project. The generated file appears as follows (the document is opened in Microsoft® Word®).