New to Telerik Document ProcessingStart a free 30-day trial

Settings

Updated on Jul 15, 2026

DocxFormatProvider allows you to import DOCX documents and export a RadFlowDocument to DOCX. The import/export settings provide modification options. This article outlines the available settings.

Export Settings

You can specify the following export settings:

InvalidDocumentAction

This setting defines the action to take when the exported RadFlowDocument does not comply with the Office Open XML standard. The possible values for the enumeration are:

  • None: The provider exports the RadFlowDocument as is without running validation. This can result in a document that is not valid and may not open correctly.

  • ThrowAnException: DocxFormatProvider validates the document before export. If the document is not valid, the provider throws an InvalidDocumentException that contains the list of validation errors. This is useful when you want to verify that you build valid DOCX documents.

  • Repair: DocxFormatProvider validates the document before export. If validation fails, the provider tries to repair the document. The result is a valid DOCX document, but the method changes the structure of the input document.

AutoUpdateFields

The AutoUpdateFields setting indicates whether fields update automatically when a user opens the exported document. The default value is false.

The following code shows how to create and specify particular export settings for DocxFormatProvider.

Example 1: Create DocxExportSettings that auto-update fields and throw on invalid document structure

C#
DocxFormatProvider provider = new DocxFormatProvider();
DocxExportSettings exportSettings = new DocxExportSettings();
exportSettings.AutoUpdateFields = true;
exportSettings.InvalidDocumentAction = InvalidDocumentAction.ThrowException;
provider.ExportSettings = exportSettings;