These destinations sit inside the text, anchored to the character before them: fields with their instructions and last result, footnotes and endnotes, comments, bookmarks, and the entries that Word gathers into an index or a table of contents.
Fields
<field> = '{' \field <fieldmod>? <fieldinst> <fieldrslt> '}'
<fieldmod> = \flddirty? & \fldedit? & \fldlock? & \fldpriv?
<fieldinst> = '{\*' \fldinst <para>+ <fldalt>? '}'
<fldalt> = \fldalt
<fieldrslt> = '{' \fldrslt <para>+ '}'
| Control word | Meaning |
|---|---|
\field | Destination: a field. |
\flddirty | The result’s formatting has changed since the field was last updated. |
\fldedit | Text has been added to or removed from the result since the last update. |
\fldlock | The field is locked and cannot be updated. |
\fldpriv | The result is not displayable, such as binary data for a field whose result is a picture. |
\fldinst | Destination: the field’s instructions, such as PAGE or HYPERLINK "https://…". A file name in it can carry \cpg. |
\fldrslt | Destination: the most recent result. Write it even when empty: readers that do not know fields still show it. It should not start with a table. |
\fldalt | At the end of the instructions: the reference is to an endnote, not a footnote. |
\datafield | Destination, always with \*: the binary data of a form field instruction, in hexadecimal. |
\fldtype, \date, \time, \wpeqn | Old field keywords; ignore them. |
Backslashes inside instructions are doubled, as in all RTF text: the Word switch
\* MERGEFORMAT is written \\* MERGEFORMAT. Examples from the
specification:
{\field {\*\fldinst AUTHOR \\*MERGEFORMAT }{\fldrslt Joe Smith}}\par\pard
{\field{\*\fldinst time \\@ "h:mm AM/PM"}{\fldrslt 8:12 AM}}
{\field{\*\fldinst NOTEREF _RefNumber } {\fldrslt 1}}
{\field{\*\fldinst NOTEREF _RefNumber \fldalt } {\fldrslt I}}
The last two refer to a footnote and to an endnote.
Form fields
A form field is a FORMTEXT, FORMCHECKBOX or
FORMDROPDOWN field whose instructions also hold a
{\*\formfield …} group, and a bookmark with the field’s name round it.
| Control word | Meaning |
|---|---|
\formfield | Destination: the form field’s settings. |
\fftypeN | Type: 0 text, 1 check box, 2 drop-down list. |
\fftypetxtN | Kind of text field: 0 regular text, 1 number, 2 date, 3 current date, 4 current time, 5 calculation. |
\ffownhelpN | 1: there is help text in \ffhelptext. |
\ffownstatN | 1: there is status bar text in \ffstattext. |
\ffprotN | 1: the field is protected. |
\ffsizeN | Check box size: 0 automatic, 1 exact (\ffhps). |
\ffhpsN | Check box size in half-points. |
\ffrecalcN | 1: recalculate the field on exit. |
\ffhaslistboxN | 1: the field has a list box. |
\ffmaxlenN | Maximum number of characters in a text field. |
\ffname | Destination: the field’s name. |
\ffdeftext | Destination: default text of a text field. |
\ffdefresN | Default entry of a list: 0 the first item, 1 the second, and so on. |
\ffformat | Destination: format of a text field. |
\ffhelptext | Destination: help text. |
\ffstattext | Destination: status bar text. |
\ffentrymcr | Destination: macro run on entering the field. |
\ffexitmcr | Destination: macro run on leaving the field. |
\ffl | Destination: one item of a drop-down list, repeated for each item. |
\ffresN | Current result of a form field: 0 to N−1, where N is the number of \ffl items. |
{\field{\*\fldinst {\*\bkmkstart Text1} FORMTEXT {{\*\datafield
00000000000000000554657874310008476565207768697a0000000000000000000000}}}{\fldrslt Default
Result}}{\*\bkmkend Text1}
In this example from the specification, the data field contains the name
Text1 (05 then 54 65 78 74 31) and the default
text Gee whiz (08 then
47 65 65 20 77 68 69 7a).
Footnotes and endnotes
<foot> = '{' \footnote <para>+ '}'
| Control word | Meaning |
|---|---|
\footnote | Destination: a footnote, anchored to the character before it. With automatic numbering it is preceded by \chftn, and the note text usually starts with its own \chftn. |
\ftnalt | After \footnote: the note is an endnote. Readers that do not know it treat it as a footnote. |
Microsoft programs do not support footnotes inside headers, footers or comments; they often corrupt the document. Placement and numbering are document properties.
\ftnbj\ftnrestart \sectd \linemod0\linex0\endnhere \pard\plain
\ri1170 \fs20 {\pu6 Mead's landmark study has been amply annotated.\chftn
{\footnote \pard\plain \s246 \fs20 {\up6\chftn }See Sahlins, Bateson, and
Geertz for a complete bibliography.}
It was her work in America during the Second World War, however, that forms
the basis for the paper. As others have noted, \chftn
{\footnote \pard\plain \s246 \fs20 {\up6\chftn}
A complete bibliography will be found at the end of this chapter.}
this period was a turning point for Margaret Mead.}
\par
The example is the specification’s; \pu6 in its second line is printed
so, and is not a defined word.
Comments (annotations)
A comment has two destinations with no group round them: the author’s initials and
the comment text, anchored to the character before them. If the comment covers a
range, the range is marked with \atrfstart and \atrfend.
Comments inside headers, footers or footnotes are not supported.
<annot> = <annotid> <atnauthor> <atntime>? \chatn <atnicn>? <annotdef>
<annotid> = '{\*' \atnid #PCDATA '}'
<atnauthor> = '{\*' \atnauthor #PCDATA '}'
<annotdef> = '{\*' \annotation <atnref> <para>+ '}'
<atnref> = '{\*' \atnref N '}'
<atntime> = '{\*' \atntime <time> '}'
<atnicn> = '{\*' \atnicn <pict> '}'
<atrfstart> = '{\*' \atrfstart N '}'
<atrfend> = '{\*' \atrfend N '}'
| Control word | Meaning |
|---|---|
\atnid | Destination: the author’s initials. |
\atnauthor | Destination: the author’s name. |
\chatn | The comment mark. |
\annotation | Destination: the comment text. |
\atnref | Destination: the name (such as a long integer) of the bookmark the comment belongs to. |
\atntime | Destination: when the comment was made. |
\atnicn | Destination: an icon for the comment, as a picture. |
\atrfstart | Destination: start of the commented range; the text is its name. |
\atrfend | Destination: end of the commented range. |
An example of a paradigm might be Newtonian physics or
Darwinian biology.{\v\fs16 {\atnid bz}\chatn{\*\annotation
\pard\plain \s224 \fs20 {\field{\fldinst page \\#'"Page:
'#'\line'"}{\fldrslt}}{\fs16 \chatn }
How about some examples that deal with social science?
That's what this paper is about.}}
Bookmarks
<book> = <bookstart> | <bookend>
<bookstart> = '{\*' \bkmkstart (\bkmkcolf? & \bkmkcoll?) #PCDATA '}'
<bookend> = '{\*' \bkmkend #PCDATA '}'
| Control word | Meaning |
|---|---|
\bkmkstart | Destination: the start of the bookmark named by its text. |
\bkmkend | Destination: the end of the bookmark of that name. Start and end match by name and may come in either order. |
\bkmkcolfN | First table column the bookmark covers (default the first). |
\bkmkcollN | Last table column it covers (default the last). |
{\*\bkmkstart paradigm} Kuhn calls such a presupposed structure a paradigm.{\*\bkmkend paradigm}
{\*\bkmkstart\bkmkcolf2\bkmkcoll5 Table1}
The second puts the bookmark Table1 on columns 2 to 5 of a table. A
bookmark name with characters outside the code page is written in
\upr.
Index entries
<idx> = '{' \xe (\xef? & \bxe? & \ixe?) <entry> (<txe> | <rxe>)? '}'
<entry> = (<char>+ <yxe>?) | ('{' <char>+ <yxe>? '}')
<yxe> = \yxe <char>+ #PCDATA
<txe> = '{' \txe <char>+ #PCDATA '}'
<rxe> = '{' \rxe #PCDATA '}'
Text of an entry that is not hidden with \v also appears in the
document, and so does \txe text. A colon control symbol,
\:, separates an entry from its sub-entry.
| Control word | Meaning |
|---|---|
\xe | Destination: an index entry. |
\xefN | Which index, for documents with several: N is the ASCII code of a letter A to Z. |
\bxe | Page number or cross-reference in bold. |
\ixe | Page number or cross-reference in italic. |
\txe | Destination: text to use instead of a page number, such as “See Animals”. |
\rxe | Destination: the name of a bookmark whose pages make the page range. |
\yxe | Pronunciation or heading of the entry, for phonetic sorting. |
\*\pxe | Destination: the “yomi” (pronunciation) of the entry, for Japanese. |
{\xe {\v Animals\:Dogs}}{\xe {\v Cats}{\txe See Animals}}
Table of contents entries
<toc> = '{' \tc | \tcn (\tcf? & \tcl?) <char>+ '}'
| Control word | Meaning |
|---|---|
\tc | Destination: an entry for a table of contents. Text not hidden with \v also appears in the document. |
\tcn | Destination: an entry without a page number. |
\tcfN | Which table: N is the ASCII code of a letter A to Z (default 67, “C”, the table of contents). |
\tclN | Level of the entry (default 1). |
{\tc\tcl2 {\v Background}}