Field Codes
- 2 minutes to read
Word Processing Document API supports the following field codes:
| Field Name | Functionality |
|---|---|
| AUTHOR | Inserts the name of a person or organization who created the document. |
| COMMENTS | Inserts the document notes. |
| CREATEDATE | Inserts the current date and time. After a mail merge the field is replaced with the date and time of the mail merge operation. |
| DATE | Inserts the current date and time. |
| DOCPROPERTY | Inserts the value of the document property specified by the field parameter. |
| DOCVARIABLE | Enables you to programmatically insert complex content when this field is updated. |
| HYPERLINK | Enables you to navigate to another location or to a bookmark. |
| IF | Compares two values and inserts the text according to the results of the comparison. |
| INCLUDEPICTURE | Inserts the specified image. |
| KEYWORDS | Inserts the document keywords or tags. |
| LASTSAVEDBY | Inserts the name of the last person who modified and saved the document. |
| MERGEFIELD | Retrieves a value from the bound data source. |
| NUMPAGES | Inserts the total number of pages. |
| PAGE | Inserts the number of the page containing the field. |
| PRINTDATE | Inserts the date and time that a document was last printed. |
| REF | Inserts bookmarked text or graphics. |
| REVNUM | Inserts the number of document revisions. |
| SAVEDATE | Inserts a date and time a document was last saved. |
| SECTIONPAGES | Inserts the total number of pages in a section. |
| SEQ | Provides sequential numbering in the document. |
| STYLEREF | Inserts text that is formatted with the specified style. |
| SUBJECT | Inserts the document topic of content. |
| SYMBOL | Inserts a symbol. |
| TC | Defines entries for the table of contents. |
| TEMPLATE | Inserts the name of a template attached to the document. |
| TIME | Inserts the current time. |
| TITLE | Inserts the document title. |
| TOC | Builds a table of contents. |
Formatting Options
The following format switches are supported: