Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

RtfField

Namespace OfficeIMO.Rtf
Assembly OfficeIMO.Rtf
Implements
IRtfCloneable IRtfInline
Modifiers sealed

RTF field with instruction text and rich inline result content.

Inheritance

  • Object
  • RtfField

Usage

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 System.String requiredposition: 0

Methods

public RtfRun AddText(String text) #
Returns: RtfRun

Adds visible result text.

Parameters

text System.String requiredposition: 0
public RtfFormFieldData GetOrCreateFormFieldData() #
Returns: RtfFormFieldData

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

public RtfHyperlinkFieldInfo GetOrCreateHyperlinkField() #
Returns: RtfHyperlinkFieldInfo

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

public RtfField SetFormFieldData(Action<RtfFormFieldData> configure) #
Returns: RtfField

Configures Word form-field metadata for this field.

Parameters

configure System.Action{OfficeIMO.Rtf.RtfFormFieldData} requiredposition: 0
public String ToPlainText() #
Returns: String

Returns visible field result text.

Properties

public String Instruction { get; set; } #

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

public RtfFieldCodeSyntax FieldCode { get; set; } #

Lossless typed syntax for Instruction.

public RtfParagraph Result { get; set; } #

Visible field result content.

public RtfHyperlinkFieldInfo HyperlinkField { get; set; } #

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

public Boolean 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.