Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Field.Unlink() Method

In This Article

Replaces the field with the field value.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v24.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

#Declaration

#Remarks

The Unlink method converts the field result to text or graphics. Unlinked fields cannot be updated.

Use the FieldCollection.Unlink method to unlink all fields in specific parts of a document (main body, text box, header, footer, comment, footnote, and endnote). The Document.UnlinkAllFields method allows you to unlink all fields in the document.

The code sample below unlinks the first field in the main document body.

using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.API.Native;
//...

using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
    // Access a document.
    Document document = wordProcessor.Document;
    //...
    // Unlink a field.
    document.Fields[0].Unlink();
}
See Also