Aspose::Words::Fields Namespace Reference

Detailed Description

The Aspose.Words.Fields namespace contains classes that represent Microsoft Word fields in a document.

Classes

class  BarcodeParameters
 Container class for barcode parameters to pass-through to BarcodeGenerator. More...
 
class  DropDownItemCollection
 A collection of strings that represent all the items in a drop-down form field. More...
 
class  Field
 Represents a Microsoft Word document field. More...
 
class  FieldAddIn
 Implements the ADDIN field. More...
 
class  FieldAddressBlock
 Implements the ADDRESSBLOCK field. More...
 
class  FieldAdvance
 Implements the ADVANCE field. More...
 
class  FieldArgumentBuilder
 Builds a complex field argument consisting of fields, nodes, and plain text. More...
 
class  FieldAsk
 Implements the ASK field. More...
 
class  FieldAuthor
 Implements the AUTHOR field. More...
 
class  FieldAutoNum
 Implements the AUTONUM field. More...
 
class  FieldAutoNumLgl
 Implements the AUTONUMLGL field. More...
 
class  FieldAutoNumOut
 Implements the AUTONUMOUT field. More...
 
class  FieldAutoText
 Implements the AUTOTEXT field. More...
 
class  FieldAutoTextList
 Implements the AUTOTEXTLIST field. More...
 
class  FieldBarcode
 Implements the BARCODE field. More...
 
class  FieldBibliography
 Implements the BIBLIOGRAPHY field. More...
 
class  FieldBidiOutline
 Implements the BIDIOUTLINE field. More...
 
class  FieldBuilder
 Builds a field from field code tokens (arguments and switches). More...
 
class  FieldChar
 Base class for nodes that represent field characters in a document. More...
 
class  FieldCitation
 Implements the CITATION field. More...
 
class  FieldCollection
 A collection of Field objects that represents the fields in the specified range. More...
 
class  FieldComments
 Implements the COMMENTS field. More...
 
class  FieldCompare
 Implements the COMPARE field. More...
 
class  FieldCreateDate
 Implements the CREATEDATE field. More...
 
class  FieldData
 Implements the DATA field. More...
 
class  FieldDatabase
 Implements the DATABASE field. More...
 
class  FieldDate
 Implements the DATE field. More...
 
class  FieldDde
 Implements the DDE field. More...
 
class  FieldDdeAuto
 Implements the DDEAUTO field. More...
 
class  FieldDisplayBarcode
 Implements the DISPLAYBARCODE field. More...
 
class  FieldDocProperty
 Implements the DOCPROPERTY field. More...
 
class  FieldDocVariable
 Implements DOCVARIABLE field. More...
 
class  FieldEditTime
 Implements the EDITTIME field. More...
 
class  FieldEmbed
 Implements the EMBED field. More...
 
class  FieldEnd
 Represents an end of a Word field in a document. More...
 
class  FieldEQ
 Implements the EQ field. More...
 
class  FieldFileName
 Implements the FILENAME field. More...
 
class  FieldFileSize
 Implements the FILESIZE field. More...
 
class  FieldFillIn
 Implements the FILLIN field. More...
 
class  FieldFootnoteRef
 Implements the FOOTNOTEREF field. More...
 
class  FieldFormat
 Provides typed access to field's numeric, date and time, and general formatting. More...
 
class  FieldFormCheckBox
 Implements the FORMCHECKBOX field. More...
 
class  FieldFormDropDown
 Implements the FORMDROPDOWN field. More...
 
class  FieldFormText
 Implements the FORMTEXT field. More...
 
class  FieldFormula
 Implements the = (formula) field. More...
 
class  FieldGlossary
 Implements the GLOSSARY field. More...
 
class  FieldGoToButton
 Implements the GOTOBUTTON field. More...
 
class  FieldGreetingLine
 Implements the GREETINGLINE field. More...
 
class  FieldHyperlink
 Implements the HYPERLINK field. More...
 
class  FieldIf
 Implements the IF field. More...
 
class  FieldImport
 Implements the IMPORT field. More...
 
class  FieldInclude
 Implements the INCLUDE field. More...
 
class  FieldIncludePicture
 Implements the INCLUDEPICTURE field. More...
 
class  FieldIncludeText
 Implements the INCLUDETEXT field. More...
 
class  FieldIndex
 Implements the INDEX field. More...
 
class  FieldInfo
 Implements the INFO field. More...
 
class  FieldKeywords
 Implements the KEYWORDS field. More...
 
class  FieldLastSavedBy
 Implements the LASTSAVEDBY field. More...
 
class  FieldLink
 Implements the LINK field. More...
 
class  FieldListNum
 Implements the LISTNUM field. More...
 
class  FieldMacroButton
 Implements the MACROBUTTON field. More...
 
class  FieldMergeBarcode
 Implements the MERGEBARCODE field. More...
 
class  FieldMergeField
 Implements the MERGEFIELD field. More...
 
class  FieldMergeRec
 Implements the MERGEREC field. More...
 
class  FieldMergeSeq
 Implements the MERGESEQ field. More...
 
class  FieldNext
 Implements the NEXT field. More...
 
class  FieldNextIf
 Implements the NEXTIF field. More...
 
class  FieldNoteRef
 Implements the NOTEREF field. More...
 
class  FieldNumChars
 Implements the NUMCHARS field. More...
 
class  FieldNumPages
 Implements the NUMPAGES field. More...
 
class  FieldNumWords
 Implements the NUMWORDS field. More...
 
class  FieldOcx
 Implements the OCX field. More...
 
class  FieldOptions
 Represents options to control field handling in a document. More...
 
class  FieldPage
 Implements the PAGE field. More...
 
class  FieldPageRef
 Implements the PAGEREF field. More...
 
class  FieldPrint
 Implements the PRINT field. More...
 
class  FieldPrintDate
 Implements the PRINTDATE field. More...
 
class  FieldPrivate
 Implements the PRIVATE field. More...
 
class  FieldQuote
 Implements the QUOTE field. More...
 
class  FieldRD
 Implements the RD field. More...
 
class  FieldRef
 Implements the REF field. More...
 
class  FieldRevNum
 Implements the REVNUM field. More...
 
class  FieldSaveDate
 Implements the SAVEDATE field. More...
 
class  FieldSection
 Implements the SECTION field. More...
 
class  FieldSectionPages
 Implements the SECTIONPAGES field. More...
 
class  FieldSeparator
 Represents a Word field separator that separates the field code from the field result. More...
 
class  FieldSeq
 Implements the SEQ field. More...
 
class  FieldSet
 Implements the SET field. More...
 
class  FieldShape
 Implements the SHAPE field. More...
 
class  FieldSkipIf
 Implements the SKIPIF field. More...
 
class  FieldStart
 Represents a start of a Word field in a document. More...
 
class  FieldStyleRef
 Implements the STYLEREF field. More...
 
class  FieldSubject
 Implements the SUBJECT field. More...
 
class  FieldSymbol
 Implements a SYMBOL field. More...
 
class  FieldTA
 Implements the TA field. More...
 
class  FieldTC
 Implements the TC field. More...
 
class  FieldTemplate
 Implements the TEMPLATE field. More...
 
class  FieldTime
 Implements the TIME field. More...
 
class  FieldTitle
 Implements the TITLE field. More...
 
class  FieldToa
 Implements the TOA field. More...
 
class  FieldToc
 Implements the TOC field. More...
 
class  FieldUnknown
 Implements an unknown or unrecognized field. More...
 
class  FieldUserAddress
 Implements the USERADDRESS field. More...
 
class  FieldUserInitials
 Implements the USERINITIALS field. More...
 
class  FieldUserName
 Implements the USERNAME field. More...
 
class  FieldXE
 Implements the XE field. More...
 
class  FormField
 Represents a single form field. More...
 
class  FormFieldCollection
 A collection of FormField objects that represent all the form fields in a range. More...
 
class  GeneralFormatCollection
 Represents a typed collection of general formats. More...
 
interface  IBarcodeGenerator
 
interface  IFieldResultFormatter
 
interface  IFieldUpdateCultureProvider
 
interface  IFieldUserPromptRespondent
 
class  MergeFieldImageDimension
 Represents an image dimension (i.e. the width or the height) used across a mail merge process. More...
 
class  ToaCategories
 Represents a table of authorities categories. More...
 
class  UserInformation
 Specifies information about the user. More...
 

Enumerations

enum  FieldIfComparisonResult
 Specifies the result of the IF field condition evaluation. More...
 
enum  FieldSwitchType
 FieldSwitchType enumeration. More...
 
enum  FieldType
 Specifies Microsoft Word field types. More...
 
enum  FieldUpdateCultureSource
 Indicates what culture to use during field update. More...
 
enum  GeneralFormat
 Specifies a general format that is applied to a numeric, text, or any field result. A field may have a combination of general formats. More...
 
enum  MergeFieldImageDimensionUnit
 Specifies an unit of an image dimension (i.e. the width or the height) used across a mail merge process. More...
 
enum  TextFormFieldType
 Specifies the type of a text form field. More...
 

Enumeration Type Documentation

◆ FieldIfComparisonResult

Specifies the result of the IF field condition evaluation.

Examples

Shows how to insert an if field.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->Write(u"Statement 1: ");
// Use document builder to insert an if field
auto field = System::DynamicCast<FieldIf>(builder->InsertField(FieldType::FieldIf, true));
// The if field will output either the TrueText or FalseText string into the document, depending on the truth of the statement
// In this case, "0 = 1" is incorrect, so the output will be "False"
field->set_LeftExpression(u"0");
field->set_ComparisonOperator(u"=");
field->set_RightExpression(u"1");
field->set_TrueText(u"True");
field->set_FalseText(u"False");
ASSERT_EQ(u" IF 0 = 1 True False", field->GetFieldCode());
ASSERT_EQ(FieldIfComparisonResult::False, field->EvaluateCondition());
// This time, the statement is correct, so the output will be "True"
builder->Write(u"\nStatement 2: ");
field = System::DynamicCast<FieldIf>(builder->InsertField(FieldType::FieldIf, true));
field->set_LeftExpression(u"5");
field->set_ComparisonOperator(u"=");
field->set_RightExpression(u"2 + 3");
field->set_TrueText(u"True");
field->set_FalseText(u"False");
ASSERT_EQ(u" IF 5 = \"2 + 3\" True False", field->GetFieldCode());
ASSERT_EQ(FieldIfComparisonResult::True, field->EvaluateCondition());
doc->UpdateFields();
doc->Save(ArtifactsDir + u"Field.IF.docx");
Enumerator
Error 

There is an error in the condition.

True 

The condition is true.

False 

The condition is false.

◆ FieldSwitchType

FieldSwitchType enumeration.

Enumerator
Unknown 
Flag 
HasArgument 

◆ FieldType

Specifies Microsoft Word field types.

Examples

Shows how to insert a field into a document by FieldCode.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Insert a simple Date field into the document
// When we insert a field through the DocumentBuilder class we can get the
// special Field object which contains information about the field
SharedPtr<Field> dateField = builder->InsertField(u"DATE \\* MERGEFORMAT");
// Update this particular field in the document so we can get the FieldResult
dateField->Update();
// Display some information from this field
// The field result is where the last evaluated value is stored. This is what is displayed in the document
// When field codes are not showing
ASSERT_EQ(System::DateTime::get_Today(), System::DateTime::Parse(dateField->get_Result()));
// Display the field code which defines the behavior of the field. This can been seen in Microsoft Word by pressing ALT+F9
ASSERT_EQ(u"DATE \\* MERGEFORMAT", dateField->GetFieldCode());
// The field type defines what type of field in the Document this is. In this case the type is "FieldDate"
ASSERT_EQ(FieldType::FieldDate, dateField->get_Type());
// Finally let's completely remove the field from the document. This can easily be done by invoking the Remove method on the object
dateField->Remove();

Demonstrates how to retrieve the field class from an existing FieldStart node in the document.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
auto field = System::DynamicCast<FieldDate>(builder->InsertField(FieldType::FieldDate, true));
field->get_Format()->set_DateTimeFormat(u"dddd, MMMM dd, yyyy");
field->Update();
SharedPtr<FieldChar> fieldStart = field->get_Start();
ASSERT_EQ(FieldType::FieldDate, fieldStart->get_FieldType());
ASPOSE_ASSERT_EQ(false, fieldStart->get_IsDirty());
ASPOSE_ASSERT_EQ(false, fieldStart->get_IsLocked());
// Retrieve the facade object which represents the field in the document
field = System::DynamicCast<FieldDate>(fieldStart->GetField());
ASPOSE_ASSERT_EQ(false, field->get_IsLocked());
ASSERT_EQ(u" DATE \\@ \"dddd, MMMM dd, yyyy\"", field->GetFieldCode());
// This updates only this field in the document
field->Update();
Enumerator
FieldNone 

Field type is not specified or unknown.

FieldCannotParse 

Specifies that the field was unable to be parsed.

FieldAddin 

Specifies the ADDIN field.

FieldAddressBlock 

Specifies the ADDRESSBLOCK field.

FieldAdvance 

Specifies the ADVANCE field.

FieldAsk 

Specifies the ASK field.

FieldAuthor 

Specifies the AUTHOR field.

FieldAutoNum 

Specifies the AUTONUM field.

FieldAutoNumLegal 

Specifies the AUTONUMLGL field.

FieldAutoNumOutline 

Specifies the AUTONUMOUT field.

FieldAutoText 

Specifies the AUTOTEXT field.

FieldAutoTextList 

Specifies the AUTOTEXTLIST field.

FieldBarcode 

Specifies the BARCODE field.

FieldBibliography 

Specifies the BIBLIOGRAPHY field.

FieldBidiOutline 

Specifies the BIDIOUTLINE field.

FieldCitation 

Specifies the CITATION field.

FieldComments 

Specifies the COMMENTS field.

FieldCompare 

Specifies the COMPARE field.

FieldCreateDate 

Specifies the CREATEDATE field.

FieldData 

Specifies the DATA field.

FieldDatabase 

Specifies the DATABASE field.

FieldDate 

Specifies the DATE field.

FieldDDE 

Specifies the DDE field.

FieldDisplayBarcode 

Specifies the DISPLAYBARCODE field.

FieldMergeBarcode 

Specifies the MERGEBARCODE field.

FieldDDEAuto 

Specifies the DDEAUTO field.

FieldDocProperty 

Specifies the DOCPROPERTY field.

FieldDocVariable 

Specifies the DOCVARIABLE field.

FieldEditTime 

Specifies the EDITTIME field.

FieldEmbed 

Specifies the EMBED field.

FieldEquation 

Specifies the EQ field.

FieldFileName 

Specifies the FILENAME field.

FieldFileSize 

Specifies the FILESIZE field.

FieldFillIn 

Specifies the FILLIN field.

FieldFootnoteRef 

Specifies the FOOTNOTEREF field.

FieldFormCheckBox 

Specifies the FORMCHECKBOX field.

FieldFormDropDown 

Specifies the FORMDROPDOWN field.

FieldFormTextInput 

Specifies the FORMTEXT field.

FieldFormula 

Specifies the = (formula) field.

FieldGreetingLine 

Specifies the GREETINGLINE field.

FieldGlossary 

Specifies the GLOSSARY field.

FieldGoToButton 

Specifies the GOTOBUTTON field.

FieldHtmlActiveX 

Specifies the field that represents an HTML control.

FieldHyperlink 

Specifies the HYPERLINK field.

FieldIf 

Specifies the IF field.

FieldInclude 

Specifies the INCLUDE field.

FieldIncludePicture 

Specifies the INCLUDEPICTURE field.

FieldIncludeText 

Specifies the INCLUDETEXT field.

FieldIndex 

Specifies the INDEX field.

FieldIndexEntry 

Specifies the XE field.

FieldInfo 

Specifies the INFO field.

FieldImport 

Specifies the IMPORT field.

FieldKeyword 

Specifies the KEYWORDS field.

FieldLastSavedBy 

Specifies the LASTSAVEDBY field.

FieldLink 

Specifies the LINK field.

FieldListNum 

Specifies the LISTNUM field.

FieldMacroButton 

Specifies the MACROBUTTON field.

FieldMergeField 

Specifies the MERGEFIELD field.

FieldMergeRec 

Specifies the MERGEREC field.

FieldMergeSeq 

Specifies the MERGESEQ field.

FieldNext 

Specifies the NEXT field.

FieldNextIf 

Specifies the NEXTIF field.

FieldNoteRef 

Specifies the NOTEREF field.

FieldNumChars 

Specifies the NUMCHARS field.

FieldNumPages 

Specifies the NUMPAGES field.

FieldNumWords 

Specifies the NUMWORDS field.

FieldOcx 

Specifies the OCX field. Normally, Aspose.Words will represent an ActiveX control as a Shape object, but for some documents, where a control does not have data and/or seems to be invalid, it will be represented as a field.

FieldPage 

Specifies the PAGE field.

FieldPageRef 

Specifies the PAGEREF field.

FieldPrint 

Specifies the PRINT field.

FieldPrintDate 

Specifies the PRINTDATE field.

FieldPrivate 

Specifies the PRIVATE field.

FieldQuote 

Specifies the QUOTE field.

FieldRef 

Specifies the REF field.

FieldRefNoKeyword 

Specifies that the field represents a REF field where the keyword has been omitted.

FieldRefDoc 

Specifies the RD field.

FieldRevisionNum 

Specifies the REVNUM field.

FieldSaveDate 

Specifies the SAVEDATE field.

FieldSection 

Specifies the SECTION field.

FieldSectionPages 

Specifies the SECTIONPAGES field.

FieldSequence 

Specifies the SEQ field.

FieldSet 

Specifies the SET field.

FieldShape 

Specifies the SHAPE field.

FieldSkipIf 

Specifies the SKIPIF field.

FieldStyleRef 

Specifies the STYLEREF field.

FieldSubject 

Specifies the SUBJECT field.

FieldSymbol 

Specifies the SYMBOL field.

FieldTemplate 

Specifies the TEMPLATE field.

FieldTime 

Specifies the TIME field.

FieldTitle 

Specifies the TITLE field.

FieldTOA 

Specifies the TOA field.

FieldTOAEntry 

Specifies the TA field.

FieldTOC 

Specifies the TOC field.

FieldTOCEntry 

Specifies the TC field.

FieldUserAddress 

Specifies the USERADDRESS field.

FieldUserInitials 

Specifies the USERINITIALS field.

FieldUserName 

Specifies the USERNAME field.

◆ FieldUpdateCultureSource

Indicates what culture to use during field update.

Examples

Shows how to specify where the culture used for date formatting during field update and mail merge is chosen from.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Insert two merge fields with German locale
builder->get_Font()->set_LocaleId(1031);
builder->InsertField(u"MERGEFIELD Date1 \\@ \"dddd, d MMMM yyyy\"");
builder->Write(u" - ");
builder->InsertField(u"MERGEFIELD Date2 \\@ \"dddd, d MMMM yyyy\"");
// Store the current culture in a variable and explicitly set it to US English
SharedPtr<System::Globalization::CultureInfo> currentCulture = System::Threading::Thread::get_CurrentThread()->get_CurrentCulture();
System::Threading::Thread::get_CurrentThread()->set_CurrentCulture(MakeObject<System::Globalization::CultureInfo>(u"en-US"));
// Execute a mail merge for the first MERGEFIELD using the current culture (US English) for date formatting
doc->get_MailMerge()->Execute(MakeArray<String>({u"Date1"}), MakeArray<SharedPtr<System::Object>>({System::ObjectExt::Box<System::DateTime>(System::DateTime(2020, 1, 1))}));
// Execute a mail merge for the second MERGEFIELD using the field's culture (German) for date formatting
doc->get_FieldOptions()->set_FieldUpdateCultureSource(FieldUpdateCultureSource::FieldCode);
doc->get_MailMerge()->Execute(MakeArray<String>({u"Date2"}), MakeArray<SharedPtr<System::Object>>({System::ObjectExt::Box<System::DateTime>(System::DateTime(2020, 1, 1))}));
// The first MERGEFIELD has received a date formatted in English, while the second one is in German
ASSERT_EQ(u"Wednesday, 1 January 2020 - Mittwoch, 1 Januar 2020", doc->get_Range()->get_Text().Trim());
// Restore the original culture
System::Threading::Thread::get_CurrentThread()->set_CurrentCulture(currentCulture);
Enumerator
CurrentThread 

The culture of the current execution thread is used to update fields.

FieldCode 

The culture specified in the field formatting properties via language setting is used.

See also
Aspose::Words::Fields::Field::get_LocaleId

◆ GeneralFormat

Specifies a general format that is applied to a numeric, text, or any field result. A field may have a combination of general formats.

Examples

Shows how to format fields.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Use a document builder to insert field with no format
SharedPtr<Field> field = builder->InsertField(u"= 2 + 3");
// We can format our field here instead of in the field code
SharedPtr<FieldFormat> format = field->get_Format();
format->set_NumericFormat(u"$###.00");
field->Update();
ASSERT_EQ(u"$ 5.00", field->get_Result());
// Apply a date/time format
field = builder->InsertField(u"DATE");
format = field->get_Format();
format->set_DateTimeFormat(u"dddd, MMMM dd, yyyy");
field->Update();
System::Console::WriteLine(String::Format(u"Today's date, in {0} format:\n\t{1}", format->get_DateTimeFormat(), field->get_Result()));
// Apply 2 general formats at the same time
field = builder->InsertField(u"= 25 + 33");
format = field->get_Format();
format->get_GeneralFormats()->Add(GeneralFormat::LowercaseRoman);
format->get_GeneralFormats()->Add(GeneralFormat::Upper);
field->Update();
int index = 0;
{
SharedPtr<System::Collections::Generic::IEnumerator<GeneralFormat>> generalFormatEnumerator = format->get_GeneralFormats()->GetEnumerator();
while (generalFormatEnumerator->MoveNext())
{
System::Console::WriteLine(String::Format(u"General format index {0}: {1}", index++, generalFormatEnumerator->get_Current()));
}
}
ASSERT_EQ(u"LVIII", field->get_Result());
ASSERT_EQ(2, format->get_GeneralFormats()->get_Count());
ASSERT_EQ(GeneralFormat::LowercaseRoman, format->get_GeneralFormats()->idx_get(0));
// Removing field formats
format->get_GeneralFormats()->Remove(GeneralFormat::LowercaseRoman);
format->get_GeneralFormats()->RemoveAt(0);
ASSERT_EQ(0, format->get_GeneralFormats()->get_Count());
field->Update();
// Our field has no general formats left and is back to default form
ASSERT_EQ(u"58", field->get_Result());
Enumerator
None 

Used to specify a missing general format.

Aiueo 

Numeric formatting. Formats a numeric result using hiragana characters in the traditional a-i-u-e-o order.

UppercaseAlphabetic 

Numeric formatting. Formats a numeric result as one or more occurrences of an uppercase alphabetic Latin character.

LowercaseAlphabetic 

Numeric formatting. Formats a numeric result as one or more occurrences of an lowercase alphabetic Latin character.

Arabic 

Numeric formatting. Formats a numeric result using Arabic cardinal numerals.

ArabicAbjad 

Numeric formatting. Formats a numeric result using ascending Abjad numerals.

ArabicAlpha 

Numeric formatting. Formats a numeric result using characters in the Arabic alphabet.

ArabicDash 

Numeric formatting. Formats a numeric result using Arabic cardinal numerals, with a prefix of "- " and a suffix of " -".

BahtText 

Numeric formatting. Formats a numeric result in the Thai counting system.

CardText 

Numeric formatting. Cardinal text (One, Two, Three, ...).

ChineseNum1 

Numeric formatting. Formats a numeric result using ascending numbers from the appropriate counting system.

ChineseNum2 

Numeric formatting. Formats a numeric result using sequential numbers from the appropriate legal format.

ChineseNum3 

Numeric formatting. Formats a numeric result using sequential numbers from the appropriate counting thousand system.

Chosung 

Numeric formatting. Formats a numeric result using sequential numbers from the Korean Chosung format.

CircleNum 

Numeric formatting. Formats a numeric result using decimal numbering enclosed in a circle, using the enclosed alphanumeric glyph character for numbers in the range 1–20.

DBChar 

Numeric formatting. Formats a numeric result using double-byte Arabic numbering.

DBNum1 

Numeric formatting. Formats a numeric result using sequential digital ideographs, using the appropriate character.

DBNum2 

Numeric formatting. Formats a numeric result using sequential numbers from the appropriate counting system.

DBNum3 

Numeric formatting. Formats a numeric result using sequential numbers from the appropriate legal counting system.

DBNum4 

Numeric formatting. Formats a numeric result using sequential numbers from the appropriate digital counting system.

DollarText 

Numeric formatting. Dollar text (One, Two, Three, ... + AND 55/100).

Ganada 

Numeric formatting. Formats a numeric result using sequential numbers from the Korean Ganada format.

GB1 

Numeric formatting. Formats a numeric result using decimal numbering followed by a period, using the enclosed alphanumeric glyph character.

GB2 

Numeric formatting. Formats a numeric result using decimal numbering enclosed in parenthesis, using the enclosed alphanumeric glyph character.

GB3 

Numeric formatting. Formats a numeric result using decimal numbering enclosed in a circle, using the enclosed alphanumeric glyph character.

GB4 

Numeric formatting. Formats a numeric result using decimal numbering enclosed in a circle, using the enclosed alphanumeric glyph character.

Hebrew1 

Numeric formatting. Formats a numeric result using Hebrew numerals.

Hebrew2 

Numeric formatting. Formats a numeric result using the Hebrew alphabet.

Hex 

Numeric formatting. Formats the numeric result using uppercase hexadecimal digits.

HindiArabic 

Numeric formatting. Formats a numeric result using Hindi numbers.

HindiCardText 

Numeric formatting. Formats a numeric result using sequential numbers from the Hindi counting system.

HindiLetter1 

Numeric formatting. Formats a numeric result using Hindi vowels.

HindiLetter2 

Numeric formatting. Formats a numeric result using Hindi consonants.

Iroha 

Numeric formatting. Formats a numeric result using the Japanese iroha.

KanjiNum1 

Numeric formatting. Formats a numeric result using a Japanese style using the appropriate counting system.

KanjiNum2 

Numeric formatting. Formats a numeric result using the appropriate counting system.

KanjiNum3 

Numeric formatting. Formats a numeric result using the appropriate counting system.

Ordinal 

Numeric formatting. Ordinal (1st, 2nd, 3rd, ...).

OrdText 

Numeric formatting. Ordinal text (First, Second, Third, ...).

UppercaseRoman 

Numeric formatting. Uppercase Roman (I, II, III, ...).

LowercaseRoman 

Numeric formatting. Lowercase Roman (i, ii, iii, ...).

SBChar 

Numeric formatting. Formats a numeric result using single-byte Arabic numbering.

ThaiArabic 

Numeric formatting. Formats a numeric result using Thai numbers.

ThaiCardText 

Numeric formatting. Formats a numeric result using sequential numbers from the Thai counting system.

ThaiLetter 

Numeric formatting. Formats a numeric result using Thai letters.

VietCardText 

Numeric formatting. Formats a numeric result using Vietnamese numerals.

Zodiac1 

Numeric formatting. Formats a numeric result using sequential numerical traditional ideographs.

Zodiac2 

Numeric formatting. Formats a numeric result using sequential zodiac ideographs.

Zodiac3 

Numeric formatting. Formats a numeric result using sequential traditional zodiac ideographs.

Caps 

Text formatting. Capitalizes the first letter of each word.

FirstCap 

Text formatting. Capitalizes the first letter of the first word.

Lower 

Text formatting. All letters are lowercase.

Upper 

Text formatting. All letters are uppercase.

CharFormat 

Field result formatting. The CHARFORMAT instruction.

MergeFormat 

Field result formatting. The MERGEFORMAT instruction.

MergeFormatInet 

Field result formatting. The MERGEFORMATINET instruction.

◆ MergeFieldImageDimensionUnit

Specifies an unit of an image dimension (i.e. the width or the height) used across a mail merge process.

Enumerator
Point 

The point (i.e. 1/72 inch).

Percent 

The percent of the original image dimension value.

◆ TextFormFieldType

Specifies the type of a text form field.

Examples

Shows how to build a form field.

auto builder = MakeObject<DocumentBuilder>();
// Insert a text form field for input a name
builder->InsertTextInput(u"", TextFormFieldType::Regular, u"", u"Enter your name here", 30);
// Insert two blank lines
builder->Writeln(u"");
builder->Writeln(u"");
ArrayPtr<String> items = MakeArray<String>({u"-- Select your favorite footwear --", u"Sneakers", u"Oxfords", u"Flip-flops", u"Other", u"I prefer to be barefoot"});
// Insert a combo box to select a footwear type
builder->InsertComboBox(u"", items, 0);
// Insert 2 blank lines
builder->Writeln(u"");
builder->Writeln(u"");
builder->get_Document()->Save(ArtifactsDir + u"DocumentBuilder.CreateForm.docx");
Enumerator
Regular 

The text form field can contain any text.

Number 

The text form field can contain only numbers.

Date 

The text form field can contain only a valid date value.

CurrentDate 

The text form field value is the current date when the field is updated.

CurrentTime 

The text form field value is the current time when the field is updated.

Calculated 

The text form field value is calculated from the expression specified in the TextInputDefault property.

@ Regular
The text form field can contain any text.
@ Upper
Text formatting. All letters are uppercase.
static ASPOSECPP_SHARED_API DateTime Parse(const String &s)
static ASPOSECPP_SHARED_API void WriteLine()
@ FieldCode
The culture specified in the field formatting properties via language setting is used.
@ False
The condition is false.
@ FieldIf
Specifies the IF field.
@ LowercaseRoman
Numeric formatting. Lowercase Roman (i, ii, iii, ...).
static ASPOSECPP_SHARED_API System::SharedPtr< Thread > get_CurrentThread()
@ FieldDate
Specifies the DATE field.
static ASPOSECPP_SHARED_API DateTime get_Today()
@ True
The condition is true.