ApplicationFields Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWindows. Forms. dll
Description
Gets a collection of all application fields contained in the text part with the input focus. This can be the main text, a text frame or a header or footer. Application fields are 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 of the text part with the input focus. This can be the main text, a text frame or a header or footer.
Syntax
public ApplicationFieldCollection ApplicationFields { get; }Public ReadOnly Property ApplicationFields As ApplicationFieldCollectionExamples
The following example updates the visible text of the CustomerName merge field.
foreach (ApplicationField field in textControl.ApplicationFields)
{
if (field.TypeName == "MERGEFIELD" &&
field.Parameters.Length > 0 &&
field.Parameters[0] == "CustomerName")
{
field.Text = "Contoso Ltd.";
}
}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
NextLimitations
Runtime only.
Read only.
See Also
Text Fields and Hypertext Links - Hypertext Links.