java.lang.Objectcom.aspose.words.FieldType
public class FieldType
Example: Example:
FieldChar fieldStart = (FieldChar)doc.getChild(NodeType.FIELD_START, 0, true);
int type = fieldStart.getFieldType();
Document doc = new Document();
DocumentBuilder builder = new 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.
Field dateField = builder.insertField("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.
System.out.println(MessageFormat.format("FieldResult: {0}", dateField.getResult()));
// Display the field code which defines the behaviour of the field. This can been seen in Microsoft Word by pressing ALT+F9.
System.out.println(MessageFormat.format("FieldCode: {0}", dateField.getFieldCode()));
// The field type defines what type of field in the Document this is. In this case the type is "FieldDate"
System.out.println(MessageFormat.format("FieldType: {0}", dateField.getType()));
// 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();
Field Summary | ||
---|---|---|
static final int | FIELD_NONE | |
Field type is not specified or unknown. | ||
static final int | FIELD_CANNOT_PARSE | |
Specifies that the field was unable to be parsed. | ||
static final int | FIELD_ADDIN | |
Specifies that the field contains data created by an add-in. | ||
static final int | FIELD_ADDRESS_BLOCK | |
Inserts an address block. | ||
static final int | FIELD_ADVANCE | |
Offset subsequent text within a line to the left, right, up or down. | ||
static final int | FIELD_ASK | |
Prompt the user for text to assign to a bookmark. | ||
static final int | FIELD_AUTHOR | |
The name of the document's author from Summary Info. | ||
static final int | FIELD_AUTO_NUM | |
Insert an automatic number. | ||
static final int | FIELD_AUTO_NUM_LEGAL | |
Insert an automatic number in legal format. | ||
static final int | FIELD_AUTO_NUM_OUTLINE | |
Insert an automatic number in outline format. | ||
static final int | FIELD_AUTO_TEXT | |
Insert an AutoText entry. | ||
static final int | FIELD_AUTO_TEXT_LIST | |
Insert text based on style. | ||
static final int | FIELD_BAR_CODE | |
Insert a delivery point barcode. | ||
static final int | FIELD_BIBLIOGRAPHY | |
Inserts a Bibliography part. | ||
static final int | FIELD_BIDI_OUTLINE | |
Specified in [ECMA-376] part 4, section 2.16.5.12 | ||
static final int | FIELD_CITATION | |
Inserts a Citation part. | ||
static final int | FIELD_COMMENTS | |
The comments from Summary Info. | ||
static final int | FIELD_COMPARE | |
Compares two values. | ||
static final int | FIELD_CREATE_DATE | |
The date the document was created. | ||
static final int | FIELD_DATA | |
Specifies that this field should redirect the mail merge data and header files to the ones specified. | ||
static final int | FIELD_DATABASE | |
Insert data from an external database. | ||
static final int | FIELD_DATE | |
Today's date. | ||
static final int | FIELD_DDE | |
Undocumented. | ||
static final int | FIELD_DDE_AUTO | |
Undocumented. | ||
static final int | FIELD_DOC_PROPERTY | |
Insert the value of the property. | ||
static final int | FIELD_DOC_VARIABLE | |
Insert the value of the document variable. | ||
static final int | FIELD_EDIT_TIME | |
The total document editing time. | ||
static final int | FIELD_EMBED | |
OLE2 embedded object. Might occur only in files. In the document object, represented by a single shape node. | ||
static final int | FIELD_EQUATION | |
Create a scientific equation. | ||
static final int | FIELD_FILE_NAME | |
The document's name and location. | ||
static final int | FIELD_FILE_SIZE | |
The size on disk of the active document. | ||
static final int | FIELD_FILL_IN | |
Prompt the user for text to insert in the document. | ||
static final int | FIELD_FOOTNOTE_REF | |
This field is identical to NOTEREF specified in [ECMA-376] part 4, section 2.16.5.47. | ||
static final int | FIELD_FORM_CHECK_BOX | |
Check box control. | ||
static final int | FIELD_FORM_DROP_DOWN | |
Drop down control. | ||
static final int | FIELD_FORM_TEXT_INPUT | |
Text control. | ||
static final int | FIELD_FORMULA | |
Calculates the result of an expression. | ||
static final int | FIELD_GREETING_LINE | |
Specified in [ECMA-376] part 4, section 2.16.5.30 | ||
static final int | FIELD_GLOSSARY | |
This field is identical to AUTOTEXT specified in [ECMA-376] part 4, section 2.16.5.8 | ||
static final int | FIELD_GO_TO_BUTTON | |
Move the insertion point to a new location. | ||
static final int | FIELD_HTML_ACTIVE_X | |
Specifies the field represents an HTML control. | ||
static final int | FIELD_HYPERLINK | |
Open and jump to the specified file. | ||
static final int | FIELD_IF | |
Evaluate arguments conditionally. | ||
static final int | FIELD_INCLUDE | |
This field is identical to INCLUDETEXT specified in [ECMA-376] part 4, section 2.16.5.34 | ||
static final int | FIELD_INCLUDE_PICTURE | |
"INCLUDEPICTURE", Insert a picture from a file. Might occur only in files. In the document object, represented by a single shape node. | ||
static final int | FIELD_INCLUDE_TEXT | |
Insert text from a file. | ||
static final int | FIELD_INDEX | |
Create an index. | ||
static final int | FIELD_INDEX_ENTRY | |
Mark an index entry. | ||
static final int | FIELD_INFO | |
Data from Summary Info. | ||
static final int | FIELD_IMPORT | |
Specified in [ECMA-376] part 4, section 2.16.5.33 | ||
static final int | FIELD_KEYWORD | |
The keywords from Summary Info. | ||
static final int | FIELD_LAST_SAVED_BY | |
Name of user who last saved the document. | ||
static final int | FIELD_LINK | |
Linked OLE2 object. The LINK field in the file can be with an image or without.
Aspose.Words represents a LINK field with an image and without differently in the model.
A LINK field with an image will be represented by a |
||
static final int | FIELD_LIST_NUM | |
Insert an element in a list. | ||
static final int | FIELD_MACRO_BUTTON | |
Run a macro. | ||
static final int | FIELD_MERGE_FIELD | |
Insert a mail merge field. | ||
static final int | FIELD_MERGE_REC | |
The number of the current merge record. | ||
static final int | FIELD_MERGE_SEQ | |
Merge record sequence number. | ||
static final int | FIELD_NEXT | |
Go to the next record in a mail merge. | ||
static final int | FIELD_NEXT_IF | |
Conditionally go to the next record in a mail merge. | ||
static final int | FIELD_NOTE_REF | |
Insert the number of a footnote or endnote. | ||
static final int | FIELD_NUM_CHARS | |
The number of characters in the document. | ||
static final int | FIELD_NUM_PAGES | |
The number of pages in the document. | ||
static final int | FIELD_NUM_WORDS | |
The number of words in the document. | ||
static final int | FIELD_OCX | |
Represents an ActiveX control such as a command button etc. Normally, Aspose.Words will represent an ActiveX control as a
|
||
static final int | FIELD_PAGE | |
Insert the number of the current page. | ||
static final int | FIELD_PAGE_REF | |
Insert the number of the page containing the specified bookmark. | ||
static final int | FIELD_PRINT | |
Download commands to a printer. | ||
static final int | FIELD_PRINT_DATE | |
The date the document was last printed. | ||
static final int | FIELD_PRIVATE | |
Stores data for documents converted from other file formats. Microsoft Word inserts a PRIVATE field when converting file formats; the field contains data needed for converting a document back to its original file format. A PRIVATE field is formatted as hidden text and doesn't affect the document layout. | ||
static final int | FIELD_QUOTE | |
Insert literal text. | ||
static final int | FIELD_REF | |
Insert the text marked by a bookmark. | ||
static final int | FIELD_REF_NO_KEYWORD | |
Specifies that the field represents a REF field where the keyword has been omitted. | ||
static final int | FIELD_REF_DOC | |
Create an index, table of contents, table of figures, and/or table of authorities by using multiple documents. | ||
static final int | FIELD_REVISION_NUM | |
Insert the number of times the document has been saved. | ||
static final int | FIELD_SAVE_DATE | |
The date the document was last saved. | ||
static final int | FIELD_SECTION | |
Insert the number of the current section. | ||
static final int | FIELD_SECTION_PAGES | |
Insert the total number of pages in the section. | ||
static final int | FIELD_SEQUENCE | |
Insert an automatic sequence number. | ||
static final int | FIELD_SET | |
Assign new text to a bookmark. | ||
static final int | FIELD_SHAPE | |
Represents an inline shape in the document. Might occur only in files. In the document object, represented by a single shape node. | ||
static final int | FIELD_SKIP_IF | |
Conditionally skip a record in a mail merge. | ||
static final int | FIELD_STYLE_REF | |
Insert the text from a like-style paragraph. | ||
static final int | FIELD_SUBJECT | |
The document's subject from Summary Info. | ||
static final int | FIELD_SYMBOL | |
Insert a special character. | ||
static final int | FIELD_TEMPLATE | |
The name of the template attached to the document. | ||
static final int | FIELD_TIME | |
The current time. | ||
static final int | FIELD_TITLE | |
The document's title from Summary Info. | ||
static final int | FIELD_TOA | |
Create a table of authorities. | ||
static final int | FIELD_TOA_ENTRY | |
Make a table of authorities entry. | ||
static final int | FIELD_TOC | |
Create a table of contents. | ||
static final int | FIELD_TOC_ENTRY | |
Make a table of contents entry. | ||
static final int | FIELD_USER_ADDRESS | |
Address from Tools Options User Info. | ||
static final int | FIELD_USER_INITIALS | |
Initials form Tools Options User Info. | ||
static final int | FIELD_USER_NAME | |
Name from Tools Options User Info. |
Field Detail |
---|
FIELD_NONE = 0 | |
public static final int FIELD_NONE |
FIELD_CANNOT_PARSE = 1 | |
public static final int FIELD_CANNOT_PARSE |
FIELD_ADDIN = 81 | |
public static final int FIELD_ADDIN |
FIELD_ADDRESS_BLOCK = 93 | |
public static final int FIELD_ADDRESS_BLOCK |
FIELD_ADVANCE = 84 | |
public static final int FIELD_ADVANCE |
FIELD_ASK = 38 | |
public static final int FIELD_ASK |
FIELD_AUTHOR = 17 | |
public static final int FIELD_AUTHOR |
FIELD_AUTO_NUM = 54 | |
public static final int FIELD_AUTO_NUM |
FIELD_AUTO_NUM_LEGAL = 53 | |
public static final int FIELD_AUTO_NUM_LEGAL |
FIELD_AUTO_NUM_OUTLINE = 52 | |
public static final int FIELD_AUTO_NUM_OUTLINE |
FIELD_AUTO_TEXT = 79 | |
public static final int FIELD_AUTO_TEXT |
FIELD_AUTO_TEXT_LIST = 89 | |
public static final int FIELD_AUTO_TEXT_LIST |
FIELD_BAR_CODE = 63 | |
public static final int FIELD_BAR_CODE |
FIELD_BIBLIOGRAPHY = 100500 | |
public static final int FIELD_BIBLIOGRAPHY |
FIELD_BIDI_OUTLINE = 92 | |
public static final int FIELD_BIDI_OUTLINE |
FIELD_CITATION = 1980 | |
public static final int FIELD_CITATION |
FIELD_COMMENTS = 19 | |
public static final int FIELD_COMMENTS |
FIELD_COMPARE = 80 | |
public static final int FIELD_COMPARE |
FIELD_CREATE_DATE = 21 | |
public static final int FIELD_CREATE_DATE |
FIELD_DATA = 40 | |
public static final int FIELD_DATA |
FIELD_DATABASE = 78 | |
public static final int FIELD_DATABASE |
FIELD_DATE = 31 | |
public static final int FIELD_DATE |
FIELD_DDE = 45 | |
public static final int FIELD_DDE |
FIELD_DDE_AUTO = 46 | |
public static final int FIELD_DDE_AUTO |
FIELD_DOC_PROPERTY = 85 | |
public static final int FIELD_DOC_PROPERTY |
FIELD_DOC_VARIABLE = 64 | |
public static final int FIELD_DOC_VARIABLE |
FIELD_EDIT_TIME = 25 | |
public static final int FIELD_EDIT_TIME |
FIELD_EMBED = 58 | |
public static final int FIELD_EMBED |
FIELD_EQUATION = 49 | |
public static final int FIELD_EQUATION |
FIELD_FILE_NAME = 29 | |
public static final int FIELD_FILE_NAME |
FIELD_FILE_SIZE = 69 | |
public static final int FIELD_FILE_SIZE |
FIELD_FILL_IN = 39 | |
public static final int FIELD_FILL_IN |
FIELD_FOOTNOTE_REF = 5 | |
public static final int FIELD_FOOTNOTE_REF |
FIELD_FORM_CHECK_BOX = 71 | |
public static final int FIELD_FORM_CHECK_BOX |
FIELD_FORM_DROP_DOWN = 83 | |
public static final int FIELD_FORM_DROP_DOWN |
FIELD_FORM_TEXT_INPUT = 70 | |
public static final int FIELD_FORM_TEXT_INPUT |
FIELD_FORMULA = 34 | |
public static final int FIELD_FORMULA |
FIELD_GREETING_LINE = 94 | |
public static final int FIELD_GREETING_LINE |
FIELD_GLOSSARY = 47 | |
public static final int FIELD_GLOSSARY |
FIELD_GO_TO_BUTTON = 50 | |
public static final int FIELD_GO_TO_BUTTON |
FIELD_HTML_ACTIVE_X = 91 | |
public static final int FIELD_HTML_ACTIVE_X |
FIELD_HYPERLINK = 88 | |
public static final int FIELD_HYPERLINK |
FIELD_IF = 7 | |
public static final int FIELD_IF |
FIELD_INCLUDE = 36 | |
public static final int FIELD_INCLUDE |
FIELD_INCLUDE_PICTURE = 67 | |
public static final int FIELD_INCLUDE_PICTURE |
FIELD_INCLUDE_TEXT = 68 | |
public static final int FIELD_INCLUDE_TEXT |
FIELD_INDEX = 8 | |
public static final int FIELD_INDEX |
FIELD_INDEX_ENTRY = 4 | |
public static final int FIELD_INDEX_ENTRY |
FIELD_INFO = 14 | |
public static final int FIELD_INFO |
FIELD_IMPORT = 55 | |
public static final int FIELD_IMPORT |
FIELD_KEYWORD = 18 | |
public static final int FIELD_KEYWORD |
FIELD_LAST_SAVED_BY = 20 | |
public static final int FIELD_LAST_SAVED_BY |
FIELD_LINK = 56 | |
public static final int FIELD_LINK |
Linked OLE2 object.
The LINK field in the file can be with an image or without.
Aspose.Words represents a LINK field with an image and without differently in the model.
A LINK field with an image will be represented by a
FIELD_LIST_NUM = 90 | |
public static final int FIELD_LIST_NUM |
FIELD_MACRO_BUTTON = 51 | |
public static final int FIELD_MACRO_BUTTON |
FIELD_MERGE_FIELD = 59 | |
public static final int FIELD_MERGE_FIELD |
FIELD_MERGE_REC = 44 | |
public static final int FIELD_MERGE_REC |
FIELD_MERGE_SEQ = 75 | |
public static final int FIELD_MERGE_SEQ |
FIELD_NEXT = 41 | |
public static final int FIELD_NEXT |
FIELD_NEXT_IF = 42 | |
public static final int FIELD_NEXT_IF |
FIELD_NOTE_REF = 72 | |
public static final int FIELD_NOTE_REF |
FIELD_NUM_CHARS = 28 | |
public static final int FIELD_NUM_CHARS |
FIELD_NUM_PAGES = 26 | |
public static final int FIELD_NUM_PAGES |
FIELD_NUM_WORDS = 27 | |
public static final int FIELD_NUM_WORDS |
FIELD_OCX = 87 | |
public static final int FIELD_OCX |
Represents an ActiveX control such as a command button etc.
Normally, Aspose.Words will represent an ActiveX control as a
FIELD_PAGE = 33 | |
public static final int FIELD_PAGE |
FIELD_PAGE_REF = 37 | |
public static final int FIELD_PAGE_REF |
FIELD_PRINT = 48 | |
public static final int FIELD_PRINT |
FIELD_PRINT_DATE = 23 | |
public static final int FIELD_PRINT_DATE |
FIELD_PRIVATE = 77 | |
public static final int FIELD_PRIVATE |
FIELD_QUOTE = 35 | |
public static final int FIELD_QUOTE |
FIELD_REF = 3 | |
public static final int FIELD_REF |
FIELD_REF_NO_KEYWORD = 2 | |
public static final int FIELD_REF_NO_KEYWORD |
FIELD_REF_DOC = 11 | |
public static final int FIELD_REF_DOC |
FIELD_REVISION_NUM = 24 | |
public static final int FIELD_REVISION_NUM |
FIELD_SAVE_DATE = 22 | |
public static final int FIELD_SAVE_DATE |
FIELD_SECTION = 65 | |
public static final int FIELD_SECTION |
FIELD_SECTION_PAGES = 66 | |
public static final int FIELD_SECTION_PAGES |
FIELD_SEQUENCE = 12 | |
public static final int FIELD_SEQUENCE |
FIELD_SET = 6 | |
public static final int FIELD_SET |
FIELD_SHAPE = 95 | |
public static final int FIELD_SHAPE |
FIELD_SKIP_IF = 43 | |
public static final int FIELD_SKIP_IF |
FIELD_STYLE_REF = 10 | |
public static final int FIELD_STYLE_REF |
FIELD_SUBJECT = 16 | |
public static final int FIELD_SUBJECT |
FIELD_SYMBOL = 57 | |
public static final int FIELD_SYMBOL |
FIELD_TEMPLATE = 30 | |
public static final int FIELD_TEMPLATE |
FIELD_TIME = 32 | |
public static final int FIELD_TIME |
FIELD_TITLE = 15 | |
public static final int FIELD_TITLE |
FIELD_TOA = 73 | |
public static final int FIELD_TOA |
FIELD_TOA_ENTRY = 74 | |
public static final int FIELD_TOA_ENTRY |
FIELD_TOC = 13 | |
public static final int FIELD_TOC |
FIELD_TOC_ENTRY = 9 | |
public static final int FIELD_TOC_ENTRY |
FIELD_USER_ADDRESS = 62 | |
public static final int FIELD_USER_ADDRESS |
FIELD_USER_INITIALS = 61 | |
public static final int FIELD_USER_INITIALS |
FIELD_USER_NAME = 60 | |
public static final int FIELD_USER_NAME |