Text

The text of the file starts at fib.fcMin. fib.fcMin is usually set to the next 128 byte boundary after the end of the FIB. The text in a Word document is ASCII text with the following restrictions (ASCII codes given in decimal):\

  • Paragraph ends are stored as a single <Carriage Return > character (ASCII 13). No other occurrences of this character sequence are allowed.
  • Hard line breaks which are not paragraph ends are stored as ASCII 11. Other line break or word wrap information is not stored.
  • Breaking hyphens are stored as ASCII 45 (normal hyphen code); Non-required hyphens are ASCII 31. Non-breaking hyphens are stored as ASCII 30.
  • Non-breaking spaces are stored as 160. Normal spaces are ASCII 32.
  • Page breaks and Section marks are ASCII 12 (normal form feed); if there's an entry in the section table, it's a section mark, otherwise it's a page break.
  • Column breaks are stored as ASCII 14.
  • Tab characters are ASCII 9 (normal).
  • The field begin mark which delimits the beginning of a field is ASCII 19. The field end mark which delimits the end of a field is ASCII 21. The field separator ,which marks the boundary between the preceding field code text and following field expansion text within a field, is ASCII 20. The field escape character is the '\' character which also serves as the formula mark.
  • The cell mark which delimits the end of a cell in a table row is stored as ASCII 7 and has the fInTable paragraph property set to fTrue (pap.fInTable == 1).
  • The row mark which delimits the end of a table row is stored as ASCII 7 and has the fInTable paragraph property and fTtp paragraph property set to fTrue (pap.fInTable == 1 && pap.fTtp == 1).
The following ASCII codes are treated as "special" characters when they have the character property special on (chp.fSpec == 1):

ASCII Code

Special Character

0

Current page number

1

Picture

2

Autonumbered footnote reference.

3

Footnote separator character

4

Footnote continuation character

5

Annotation reference

6

Line number

7

Hand Annotation picture (Generated in Pen Windows)

8

Drawn object

10

Abbreviated date (e.g. "Wed, Dec 1, 1993")

11

Time in hours:minutes:seconds

12

Current section number

14

Abbreviated day of week (e.g. "Thu" for "Thursday")

15

Day of week (e.g. "Thursday")

16

Day short (e.g. "9" for the ninth day of the month)

22

Hour of current time with no leading zero

23

Hour of current time (two digit with leading zero when necessary)

24

Minute of current time with no leading zero

25

Minute of current time(two digit with leading zero when necessary)

26

Seconds of current time

27

AM/PM for current time

28

Current time in hours:minutes:seconds in old format

29

Date M (e.g. "December 2, 1993")

30

Short Date (e.g. "12/2/93")

33

Short Month (e.g. "12" to represent "December")

34

Long Year (e.g. "1993")

35

Short Year (e.g. "93")

36

Abbreviated month (e.g. "Dec" to represent "December")

37

Long month (e.g. "December")

38

Current time in hours:minutes (e.g. "2:01")

39

Long date (e.g. "Thursday, December 2, 1993")

41

Print Merge Helper field


Note

The end of a section is also the end of a paragraph. The last character of a section is a section mark which stands in place of the paragraph mark normally required to end a paragraph. An exception is made for the last character of a document which is always a paragraph mark although the end of a document is always an implicit end of section.

If !fib.fComplex, the document text stream is represented by the text beginning at fib.fcMin up to (but not including) fib.fcMac. Otherwise, the document is represented by the piece table stored in the file in the data beginning at .fib.fcClx.

The document text stream includes text that is part of the main document, plus any text that exists for the footnote, header, macro, or annotation subdocuments. The sizes of the main document and the header, footnote, macro and annotation subdocuments are stored in the fib, in variables fib.ccpText, fib.ccpFtn, fib.ccpHdr, fib.ccpMcr, fib.ccpEdn, fib.ccpTxbx, fib.ccpHdrTxbox and fib.ccpAtn respectively. In a non-complex file, this means that the text of the main document begins at fib.fcMin in the file and continues through fib.fcMin + fib.ccpText; that the text of the footnote subdocument begins at fib.fcMin + fib.ccpText and extends to fib.fcMin + fib.ccpText + fib.ccpFtn; that the text of the header subdocument begins at fib.fcMin + fib.ccpText + fib.ccpFtn and extends to fib.fcMin + fib.ccpText + fib.ccpFtn + fib.ccpHdr; that the text of the annotation subdocument begins at .fib.fcMin + fib.ccpText + fib.ccpFtn + fib.ccpHdr and extends to fib.fcMin + fib.ccpText + fib.ccpFtn + fib.ccpHdr + ccpAtn; that the text of the endnote subdocument begins at .fib.fcMin + fib.ccpText + fib.ccpFtn + fib.ccpHdr +ccpAtn and extends to fib.fcMin + fib.ccpText + fib.ccpFtn + fib.ccpHdr + fib.ccpEdn; that the text of the textbox subdocument begins at .fib.fcMin + fib.ccpText + fib.ccpFtn + fib.ccpHdr +fib.ccpAtn + fib.ccpEdn and extends to fib.fcMin + fib.ccpText + fib.ccpFtn + fib.ccpHdr + fib.ccpEdn + fib.ccpTxbx and that the text of the header textbox subdocument begins at .fib.fcMin + fib.ccpText + fib.ccpFtn + fib.ccpHdr +fib.ccpAtn + fib.ccpEdn + fib.ccpTxbx and extends to fib.fcMin + fib.ccpText + fib.ccpFtn + fib.ccpHdr + fib.ccpEdn + fib.ccpTxbx + fib.ccpHdrTxbx.

In a complex, fast-saved file, the main document text must be located by examining the piece table entries from the 0th piece table entry through the piece table entry that describes cp = fib.ccpText.

A footnote subdocument's text must be located by examining the piece table entries beginning with the one that describes cp=fib.ccpText through the entry that describes cp = fib.ccpText + fib.ccpFtn.

A header subdocument's text must be located by examining the piece table entries beginning with the one that describes cp=fib.ccpText + ccpFtn through the entry that describes cp = fib.ccpText +fib.ccpFtn + fib.ccpHdr.

An annotation subdocument's text must be located by examining the piece table entries beginning with the one that describes cp=fib.ccpText + ccpFtn + fib.ccpHdr through the entry that describes cp = fib.ccpText +fib.ccpFtn + fib.ccpHdr +fib.ccpAtn.

An endnote subdocument's text must be located by examining the piece table entries beginning with the one that describes cp=fib.ccpText + ccpFtn + fib.ccpHdr + fib.ccpAtn through the entry that describes cp = fib.ccpText +fib.ccpFtn + fib.ccpHdr +fib.ccpAtn.+ fib.ccpEdn

A textbox subdocument's text must be located by examining the piece table entries beginning with the one that describes cp=fib.ccpText + ccpFtn + fib.ccpHdr + fib.ccpAtn + fib.ccpEdn through the entry that describes cp = fib.ccpText +fib.ccpFtn + fib.ccpHdr +fib.ccpAtn.+ fib.ccpEdn + fib.ccpTxbx

A header textbox subdocument's text must be located by examining the piece table entries beginning with the one that describes cp=fib.ccpText + ccpFtn + fib.ccpHdr + fib.ccpAtn + fib.ccpEdn + fib.ccpTxbx through the entry that describes cp = fib.ccpText +fib.ccpFtn + fib.ccpHdr +fib.ccpAtn.+ fib.ccpEdn + fib.ccpTxbx+ fib.ccpHdrTxbx