Word Processing Document API
- 7 minutes to read
The Word Processing Document API is a non-visual .NET library that allows you to generate and process Microsoft® Word® documents across multiple platforms and operating systems. This library helps you automate such common tasks as file conversion, text formatting, document protection, mail merge, printing, and export to PDF/HTML.
License Note
The Word Processing Document API is available as part of the following DevExpress Subscriptions: Universal, DXperience, WinForms, WPF, Office File API, and ASP.NET. Refer to this page for details: DevExpress Subscription Plans.
If you own a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription, you can use the following additional features within your word processing app:
- Asynchronous load, save, and export (to PDF and HTML) operations
- Digital signatures
- Embedded charts
Get Started
If you are new to the Word Processing Document API, refer to the following topics first:
Supported Document Elements
The Word Processing Document API allows you to create, access, modify, export, print, and remove the following document elements:
- Sections
- Divide your document into sections and specify individual page settings for each section.
- Paragraphs
- Create new or remove existing paragraphs, and define paragraph formatting (alignment, line spacing, indentation, pagination options, background color, and so on).
- Lists
- Create bulleted, numbered, or multilevel lists to arrange and outline information in your documents.
- Tables
- Insert tables to organize your information in rows and columns. You can change the table layout (split or merge cells, insert or delete rows and columns) and customize the appearance of the entire table or individual cells.
- Shapes and Pictures
- The Word Processing Document API allows you to insert shapes and pictures. All shape types are supported: from simple lines and rectangles to 3D shapes with advanced effects.
- Charts
- You can create charts to visualize data in your documents. The Word Processing Document API supports a broad range of 2D and 3D charts: from the commonly used Column and Line charts to modern Excel 2016 charts (Box and Whisker, Histogram, Pareto, Waterfall, Treemap, Sunburst, and Funnel).
- Hyperlinks and Bookmarks
- Insert hyperlinks to navigate to web pages and existing files. Create bookmarks and add links to them to jump to specific locations within your document.
- Headers and Footers
- Add headers and footers to your documents to repeat specific information (such as titles, authors, and page numbers) at the top and bottom of each page.
- Footnotes and Endnotes
- Use footnotes and endnotes to add supplemental notes, comments, and citations to text in your documents. Footnotes appear at the bottom of the page, and endnotes come at the end of the document or section.
- Watermarks
- The Word Processing Document API allows you to insert picture and text watermarks, specify watermark options, and delete existing watermarks from a document.
- Content Controls
- You can add content controls to your documents to create surveys and fillable forms. These controls are interactive, so you can input and select date as needed.
- OLE Objects
- The Word Processing Document API supports OLE (Object Linking and Embedding) technology that allows you to insert data (spreadsheets, images, presentations, charts, equations, and so on) from external applications into your document.
- ActiveX Controls
- The Word Processing Document API allows you to access existing ActiveX controls, obtain their properties (type, name, and ProgID), or remove these controls from a document.
Import, Export, and Print Documents
You can create, load, convert, merge, split, edit, print, and save documents in code. The Word Processing Document API supports left-to-right and right-to-left document layouts.
- Supported Formats
- Import and Export
- HTML Import and Export
- Merge and Split Documents
- Print Documents
Mail Merge and Dynamic Content
Use Mail Merge to automate document generation. Create a template with value placeholders and bind this template to an external data source to generate multiple documents. The Word Processing Document API has a set of events that allow you to control the Mail Merge process at every stage.
You can use fields to insert dynamic content (such as RSS feed, text, images, or barcodes) into a document. Fields are automatically updated when the document is saved, printed, or when a mail merge operation is executed.
Format Documents
The Word Processing Document API ships with the following format features:
Format document text. Change individual format attributes (font settings, character style, background and foreground colors) for any text fragment. You can also create character and paragraph styles to specify multiple format attributes simultaneously and apply the same formatting to different parts of your text.
Change the page layout. Configure settings like page orientation, paper size, and margins, divide a page into columns, and insert page breaks. You can apply separate layout settings to the first page, and hide its header and footer to start numbering from the second page.
Insert a table of contents. Mark specific parts of your document as table entries and use the TOC field to build the table of contents.
Enable word hyphenation. Embed different dictionaries to automatically hyphenate text.
Protect and Secure Documents
The Word Processing Document API allows you to protect your documents to prevent unauthorized access. Security options include:
- Protect your document with a password. Make a document read-only or allow users to make revisions, add comments, modify only certain sections, or fill in forms without making other modifications.
- Grant user permissions. Allow authorized users to edit specific parts of a protected document.
- Open and save password-encrypted documents. The Word Processing Document API uses 256-bit AES encryption for DOCX files and the custom RC4 CryptoAPI implementation for DOC files.
- Sign Microsoft Word documents. Add digital signatures to your documents, configure signature options, and validate existing signatures to ensure the authenticity and integrity of document content.
Review Documents
The Word Processing Document API offers the following collaboration options:
- Enable Track Changes. View, accept, or reject revisions made to a document. Specify a color and format for each revision type and change the review mode.
- Use comments. Attach comments to specific parts of a document, highlight commented ranges, and modify or delete existing comments.
DevExpress UI Development Subscriptions
In addition to Office File API, DevExpress offers a wide variety of UI Controls for desktop platforms (WinForms, WPF) and the web (Blazor, ASP.NET Core, JavaScript, Web Forms, MVC). DevExpress UI controls seamlessly integrate into your projects and help you craft visually stunning and user-friendly applications. With a wide array of controls at your disposal, from data grids to responsive layouts and data visualization tools, you can build applications that meet and exceed user expectations.
In particular, Rich Text Editor UI Controls are available for WinForms, WPF, ASP.NET Core, ASP.NET Web Forms, and ASP.NET MVC.
- WinForms Rich Text Editor
- WPF Rich Text Editor
- Blazor Rich Text Editor
- ASP.NET Core Rich Text Editor
- ASP.NET Rich Text Editor
If you need UI Controls for a specific platform, give the following DevExpress subscriptions a try:
If you develop applications for multiple .NET / JavaScript platforms or you are interested in additional products DevExpress has to offer, take a look at our bigger bundle - DevExpress Universal subscription. This subscription includes Office File API, all DevExpress UI Controls for .NET / JavaScript, and several additional products for cross-platform development.
If you haven’t yet done so, download our fully-functional 30-day trial version and try out DevExpress controls and libraries in your projects: