ApplicationFields Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. Core. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.Server. dll
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. 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.
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.