Field.ResultRange Property | Office File API | DevExpress Documentation Skip to main content

Field.ResultRange Property

Returns the range that contains the field result.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v26.1.Core.dll

Declaration

DocumentRange ResultRange { get; }

Property Value

Example

The code sample below checks all field results and inserts “Empty Value!” if the field result is empty:

using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.API.Native;
using System.Drawing;

using (var wordProcessor = new RichEditDocumentServer()) {
    Document document = wordProcessor.Document;
    foreach (Field field in document.Fields) {
        string strResult = document.GetText(field.ResultRange);

        if (strResult == "") {
            document.InsertText(field.ResultRange.Start, "Empty Value!");
        }
    }
} 

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ResultRange property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also
Use of this site constitutes acceptance of our Website Terms of Use and Privacy Policy (Updated). Cookies Settings