Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

RtfField

OfficeIMO.Rtf

Namespace
OfficeIMO.Rtf
Assembly
OfficeIMO.Rtf
Source revision
ba882f6b0d07 with working tree changes
Implements
IRtfCloneable IRtfInline
Modifiers
sealed

RTF field with instruction text and rich inline result content.

Inheritance

  • object
  • RtfField

Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Constructors

public RtfField(string instruction) #

Creates an RTF field.

Parameters

instruction string required

Methods

public RtfRun AddText(string text) #

Adds visible result text.

Parameters

text string required

Returns

RtfRun
public RtfFormFieldData GetOrCreateFormFieldData() #

Creates form-field metadata if it does not already exist and returns it.

public RtfHyperlinkFieldInfo GetOrCreateHyperlinkField() #

Creates hyperlink field metadata if it does not already exist and returns it.

public RtfField SetFormFieldData(Action<RtfFormFieldData> configure) #

Configures Word form-field metadata for this field.

Parameters

configure System.Action<OfficeIMO.Rtf.RtfFormFieldData> required

Returns

RtfField
public string ToPlainText() #

Returns visible field result text.

Returns

string

Properties

public string Instruction { get; set; } #

Raw field instruction text, for example PAGE \* MERGEFORMAT.

public RtfFieldCodeSyntax FieldCode { get; private set; } #

Lossless typed syntax for RtfField.Instruction.

public RtfParagraph Result { get; private set; } #

Visible field result content.

public RtfHyperlinkFieldInfo? HyperlinkField { get; set; } #

Parsed metadata for HYPERLINK fields. The raw RtfField.Instruction remains authoritative.

public bool IsEquation { get; } #

Gets whether this is a Word EQ mathematical equation field.

public RtfFormFieldData? FormFieldData { get; set; } #

Optional Word form-field metadata from an RTF \ffdata destination.