Fields
All versions of Microsoft Word for Windows and version 6.0 and later of Microsoft Word for the Macintosh have fields. If you’re writing an RTF reader and expect to do anything with fields, keep the following notes in mind:
-
Field instructions may have arbitrary amounts of character formatting and arbitrarily nested groups. While the groups will be properly nested within the field instructions, you may be inside an arbitrary number of groups by the time you know which field you are working with. If you then expect to be able to skip to the end of the field instructions, you’ll have to know how many groups have started so that you can skip to the end properly.
-
Some fields, the INCLUDE field in particular, can have section breaks in the field results. If this occurs, then the text after the end of the field does not have the same section properties as the text at the start of the field; the section properties must not be restored when the field results contain section breaks.