Available for: UI for ASP.NET MVC | UI for ASP.NET AJAX | UI for Blazor | UI for WPF | UI for WinForms | UI for Xamarin | UI for WinUI | UI for ASP.NET Core | UI for .NET MAUI

New to Telerik Document Processing? Download free 30-day trial


DocxFormatProvider allows for import of docx documents and respectively export of RadFlowDocument to docx. Additionally, the import/export settings provide modification options. The current article outlines the available settings.

Export Settings

The export settings which you can specify are as follows:


This setting allows you to define the action which should be executed in case the RadFlowDocument that is about to be exported is not compliant with Open Office XML standard. The possible values for the enumeration are:

  • None: The RadFlowDocument will be exported as is without making any validations. This can result in invalid document that may not be opened correctly.

  • ThrowAnException: DocxFormatProvider runs validation over the document passed for export. If the document is invalid, the provider throws an InvalidDocumentException which contains the list with the validation errors. This is particularly useful when you want to assure you are building valid docx documents.

  • Repair: DocxFormatProvider runs validation over the document passed for export. If there is a validation exception, the provider tries to repair it. The result is a valid docx document, but the method changes the structure of the input document.


The AutoUpdateFields setting indicates if fields should be auto-updated when the exported document is opened. The default value is False.

Example 1 shows how you can create and specify particular export settings to DocxFormatProvider.

Example 1: Create DocxExportSettings

DocxFormatProvider provider = new DocxFormatProvider(); 
DocxExportSettings exportSettings = new DocxExportSettings(); 
exportSettings.AutoUpdateFields = true; 
exportSettings.InvalidDocumentAction = InvalidDocumentAction.ThrowException; 
provider.ExportSettings = exportSettings; 
In this article