HEADERS AND FOOTERS

The header and footer text characters in a full saved file begin at offset fib.fcMin + fib.ccpText + fib.ccpFtn and extend till fib.fcMin + fib.ccpText + fib.ccpFtn + fib.ccpHdr. In a complex fast-saved document , the footnote text begins at CP fib.ccpText + fib.ccpFtn and extends till fib.ccpText + fib.ccpFtn + fib.ccpHdr. The plcfhdd, a table whose location and length within the file is stored in fib.fcPlcfhdd and fib.cbPlcfhdd, describes where the text of each header/footer begins. If there are n headers/footers stored in the Word file, the plcfhdd consists of n + 2 CP entries. The beginning CP of the ith header/footer is the ith CP in the plcfhdd. The limit CP (the CP of character 1 position past the end of a header/footer) of the ith header/footer is the i + 1 st CP in the plcfhdd. Note that at the limit CP - 1, Word always places a chEop as a placeholder which is never displayed as part of the header/footer. This allows Word to change an existing header/footer to be empty.

If there are n header/footers, the n+2nd CP entry value is always 1 greater than the n+1st CP entry value. A paragraph end (ASCII 13) is always stored at the file position marked by the n+1st CP value.

The transformation in a full saved file from a header/footer CP to an offset from the beginning of a file (fc) is fc = fib.fcMin + ccpText + ccpFtn + cp.

In Word, headers/footers can be defined for a document that:

will act as a separator between main text and footnote text

will print below footnote text on a page when footnote text must be continued on a succeeding page (continuation separator)

will print above footnote text on a page when the text must be continued from a previous page (continuation notice)

will act as a separator between main text and endnote text

will print below endnote text on a page when endnote text must be continued on a succeeding page (continuation separator)

will print above endnote text on a page when the text must be continued from a previous page (continuation notice)

Also for each section defined for the document, distinct headers can be defined for printing on odd-numbered/right facing pages, even-numbered /left facing pages and the first page of a section. Similarly for each document section, distinct footers can be defined for printing on odd-numbered/right facing pages, even-numbered/left facing pages and the first page of a section.

The plcfhdd contains an entry for each kind of header or footer. (The grpfIhdt is no longer used to find entries in the plcfhdd.) Indices in the plcfhdd are as follows:

header for even pages

header for odd pages

footer for even pages

footer for odd pages

header for first page of section

footer for first page of section

footnote separator

footnote continuation separator

footnote continuation notice

endnote separator

endnote continuation separator

endnote continuation notice