FieldType enumeration

FieldType enumeration

Specifies Microsoft Word field types.

Members

NameDescription
FieldNoneField type is not specified or unknown.
FieldCannotParseSpecifies that the field was unable to be parsed.
FieldAddinSpecifies the ADDIN field.
FieldAddressBlockSpecifies the ADDRESSBLOCK field.
FieldAdvanceSpecifies the ADVANCE field.
FieldAskSpecifies the ASK field.
FieldAuthorSpecifies the AUTHOR field.
FieldAutoNumSpecifies the AUTONUM field.
FieldAutoNumLegalSpecifies the AUTONUMLGL field.
FieldAutoNumOutlineSpecifies the AUTONUMOUT field.
FieldAutoTextSpecifies the AUTOTEXT field.
FieldAutoTextListSpecifies the AUTOTEXTLIST field.
FieldBarcodeSpecifies the BARCODE field.
FieldBibliographySpecifies the BIBLIOGRAPHY field.
FieldBidiOutlineSpecifies the BIDIOUTLINE field.
FieldCitationSpecifies the CITATION field.
FieldCommentsSpecifies the COMMENTS field.
FieldCompareSpecifies the COMPARE field.
FieldCreateDateSpecifies the CREATEDATE field.
FieldDataSpecifies the DATA field.
FieldDatabaseSpecifies the DATABASE field.
FieldDateSpecifies the DATE field.
FieldDDESpecifies the DDE field.
FieldDisplayBarcodeSpecifies the DISPLAYBARCODE field.
FieldMergeBarcodeSpecifies the MERGEBARCODE field.
FieldDDEAutoSpecifies the DDEAUTO field.
FieldDocPropertySpecifies the DOCPROPERTY field.
FieldDocVariableSpecifies the DOCVARIABLE field.
FieldEditTimeSpecifies the EDITTIME field.
FieldEmbedSpecifies the EMBED field.
FieldEquationSpecifies the EQ field.
FieldFileNameSpecifies the FILENAME field.
FieldFileSizeSpecifies the FILESIZE field.
FieldFillInSpecifies the FILLIN field.
FieldFootnoteRefSpecifies the FOOTNOTEREF field.
FieldFormCheckBoxSpecifies the FORMCHECKBOX field.
FieldFormDropDownSpecifies the FORMDROPDOWN field.
FieldFormTextInputSpecifies the FORMTEXT field.
FieldFormulaSpecifies the = (formula) field.
FieldGreetingLineSpecifies the GREETINGLINE field.
FieldGlossarySpecifies the GLOSSARY field.
FieldGoToButtonSpecifies the GOTOBUTTON field.
FieldHtmlActiveXSpecifies the field that represents an HTML control.
FieldHyperlinkSpecifies the HYPERLINK field.
FieldIfSpecifies the IF field.
FieldIncludeSpecifies the INCLUDE field.
FieldIncludePictureSpecifies the INCLUDEPICTURE field.
FieldIncludeTextSpecifies the INCLUDETEXT field.
FieldIndexSpecifies the INDEX field.
FieldIndexEntrySpecifies the XE field.
FieldInfoSpecifies the INFO field.
FieldImportSpecifies the IMPORT field.
FieldKeywordSpecifies the KEYWORDS field.
FieldLastSavedBySpecifies the LASTSAVEDBY field.
FieldLinkSpecifies the LINK field.
FieldListNumSpecifies the LISTNUM field.
FieldMacroButtonSpecifies the MACROBUTTON field.
FieldMergeFieldSpecifies the MERGEFIELD field.
FieldMergeRecSpecifies the MERGEREC field.
FieldMergeSeqSpecifies the MERGESEQ field.
FieldNextSpecifies the NEXT field.
FieldNextIfSpecifies the NEXTIF field.
FieldNoteRefSpecifies the NOTEREF field.
FieldNumCharsSpecifies the NUMCHARS field.
FieldNumPagesSpecifies the NUMPAGES field.
FieldNumWordsSpecifies the NUMWORDS field.
FieldOcxSpecifies the OCX field.
FieldPageSpecifies the PAGE field.
FieldPageRefSpecifies the PAGEREF field.
FieldPrintSpecifies the PRINT field.
FieldPrintDateSpecifies the PRINTDATE field.
FieldPrivateSpecifies the PRIVATE field.
FieldQuoteSpecifies the QUOTE field.
FieldRefSpecifies the REF field.
FieldRefNoKeywordSpecifies that the field represents a REF field where the keyword has been omitted.
FieldRefDocSpecifies the RD field.
FieldRevisionNumSpecifies the REVNUM field.
FieldSaveDateSpecifies the SAVEDATE field.
FieldSectionSpecifies the SECTION field.
FieldSectionPagesSpecifies the SECTIONPAGES field.
FieldSequenceSpecifies the SEQ field.
FieldSetSpecifies the SET field.
FieldShapeSpecifies the SHAPE field.
FieldSkipIfSpecifies the SKIPIF field.
FieldStyleRefSpecifies the STYLEREF field.
FieldSubjectSpecifies the SUBJECT field.
FieldSymbolSpecifies the SYMBOL field.
FieldTemplateSpecifies the TEMPLATE field.
FieldTimeSpecifies the TIME field.
FieldTitleSpecifies the TITLE field.
FieldTOASpecifies the TOA field.
FieldTOAEntrySpecifies the TA field.
FieldTOCSpecifies the TOC field.
FieldTOCEntrySpecifies the TC field.
FieldUserAddressSpecifies the USERADDRESS field.
FieldUserInitialsSpecifies the USERINITIALS field.
FieldUserNameSpecifies the USERNAME field.

Examples

Shows how to insert a field into a document using a field code.

let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);

let field = builder.insertField("DATE \\@ \"dddd, MMMM dd, yyyy\"");

expect(field.type).toEqual(aw.Fields.FieldType.FieldDate);
expect(field.getFieldCode()).toEqual("DATE \\@ \"dddd, MMMM dd, yyyy\"");

// This overload of the InsertField method automatically updates inserted fields.
expect((Date.now() - Date.parse(field.result)) / 86400000).toBeLessThanOrEqual(1);

Shows how to work with a FieldStart node.

let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);

let field = builder.insertField(aw.Fields.FieldType.FieldDate, true).asFieldDate();
field.format.dateTimeFormat = "dddd, MMMM dd, yyyy";
field.update();

let fieldStart = field.start;

expect(fieldStart.fieldType).toEqual(aw.Fields.FieldType.FieldDate);
expect(fieldStart.isDirty).toEqual(false);
expect(fieldStart.isLocked).toEqual(false);

// Retrieve the facade object which represents the field in the document.
field = fieldStart.getField().asFieldDate();

expect(field.isLocked).toEqual(false);
expect(field.getFieldCode()).toEqual(" DATE  \\@ \"dddd, MMMM dd, yyyy\"");

// Update the field to show the current date.
field.update();

See Also