# ServerTextControl.ApplicationFields Property

> Gets a collection of all Microsoft Word or Heiler HighEdit fields that have been created or imported from a Microsoft Word or RTF document. The property value is an object of the type ApplicationFieldCollection. Before loading a document the LoadSettings.ApplicationFieldFormat property must be set, otherwise this collection is empty. The collection contains the fields contained in the main text of the document.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 14.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > ServerTextControl.ApplicationFields Property
- **651 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/applicationfields-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/applicationfields-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/applicationfields-property/llms-full.txt

---

### Description

Gets a collection of all Microsoft Word or Heiler HighEdit fields that have been created or imported from a Microsoft Word or RTF document. The property value is an object of the type [ApplicationFieldCollection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/applicationfieldcollection/llms-full.txt). Before loading a document the [LoadSettings.ApplicationFieldFormat](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/loadsettings/applicationfieldformat-property/llms-full.txt) property must be set, otherwise this collection is empty. The collection contains the fields contained in the main text of the document.

### Syntax

```csharp
public ApplicationFieldCollection ApplicationFields { get; }
```

```vbnet
Public ReadOnly Property ApplicationFields As ApplicationFieldCollection
```

### Examples

The following example updates the visible text of the `CustomerName` merge field.

```csharp
foreach (ApplicationField field in textControl.ApplicationFields)
{
    if (field.TypeName == "MERGEFIELD" &&
        field.Parameters.Length > 0 &&
        field.Parameters[0] == "CustomerName")
    {
        field.Text = "Contoso Ltd.";
    }
}
```

```vbnet
For Each field As ApplicationField In textControl.ApplicationFields
    If field.TypeName = "MERGEFIELD" AndAlso
       field.Parameters.Length > 0 AndAlso
       field.Parameters(0) = "CustomerName" Then
        field.Text = "Contoso Ltd."
    End If
Next
```

### Limitations

Runtime only.

Read only.

### See Also

Text Fields and Hypertext Links - Hypertext Links.

---

## Nearby

- **Previous:** [ServerTextControl.Append Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/append-method/llms-full.txt)
- **Next:** [ServerTextControl.BackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/backcolor-property/llms-full.txt)
