The whole document is one sequence of character positions (CPs). The FIB’s character counts divide it into stories, which come one after the other.
Stories
ccpTextthe main documentstory 1ccpFtnfootnote textstory 2ccpHddheaders and footersstory 3ccpAtncommentsstory 4ccpEdnendnote textstory 5ccpTxbxtext boxes in the main documentstory 6ccpHdrTxbxtext boxes in headers and footersstory 7
A story of 0 characters is not present. A document with several stories ends with an extra paragraph mark, after the last story.
Footnotes and endnotes
PlcffndRef holds the CPs of the footnote reference marks in the main
document. PlcffndTxt holds the CPs where each footnote’s text starts in the
footnote story, relative to the start of that story. PlcfendRef and
PlcfendTxt are the same for endnotes.
Headers and footers
PlcfHdd divides the header story into pieces with no data
elements: the first six are separators for footnotes and endnotes, then six for each
section, in the order even header, odd header, even footer, odd footer, first header,
first footer. A piece of length zero means that header or footer is absent.
Fields
A field is written in the text as the characters 0x13, the field code,
0x14, the result, 0x15. A PlcfFld for each story
gives the CP and a two-byte Fld of each of those characters: its
character, and at the begin character the field’s type (88 HYPERLINK, for example).
Bookmarks
SttbfBkmk names the bookmarks in a string table (see
Styles and fonts for the
shape of a string table). PlcfBkf and PlcfBkl give the start
and end CP of each.
Inline pictures
An inline picture is the character 0x01 with sprmCFSpec and
sprmCPicLocation. The operand is an offset in the Data stream
where a PICF structure starts.
lcbthe size of the whole picture entry4cbHeaderthe size of this header, 682mfpthe picture kind: 0x64 or 0x66 Office Art, 8 metafile, 0x62 a linked TIFF, 0x63 a linked BMP8Header restcrop, scaling and borders54Picture dataan Office Art inline shape, whose image is a BLIPvaries
For 0x66 a one-byte name length and the file name come first. Then an Office Art
shape container (record type 0xF004) is followed by the file blocks. A file block
is either a bare BLIP record or an OfficeArtFBSE (type 0xF007, 36 bytes
and a name) with the BLIP after it. The BLIP types are EMF 0xF01A, WMF
0xF01B, PICT 0xF01C, JPEG 0xF01D, PNG 0xF01E,
DIB 0xF01F and TIFF 0xF029; a metafile BLIP holds a zlib-compressed
metafile. The viewer draws the first BLIP: PNG and JPEG as they are, a DIB as PNG, EMF and WMF
replayed on a canvas.
Word 2 and Word 6 keep the same structure with a 58-byte header (cbHeader 0x3A)
and, for a mapping mode of 1 to 8, a Windows metafile without the placeable header right after
it. Word 6 and 95 pictures are drawn this way. Word 2 stores the picture position in its own
fixed character properties, which are not interpreted yet, so those pictures stay labelled.
Drawn objects
Shapes that float over the text are the character 0x08 with
sprmCFSpec. PlcSpaMom gives each one’s position and shape
identifier; the Office Art data is at DggInfo in the table stream.
PlcSpaMom is a list of CPs followed by 26-byte SPA entries: the shape
identifier (4 bytes), the four edges of the anchor (16), flags (2) and the text-box count
(4). PlcSpaHdr does the same for headers and footers, with CPs counted from the start
of that story. DggInfo is an OfficeArtContent: the drawing group
container (0xF000), which holds the BLIP store (0xF001) with one
FBSE per picture, then for each drawing a one-byte label and a drawing container
(0xF002) with shape containers. A shape’s pib property (property
0x0104 in its property table 0xF00B) is the 1-based number of its file block in
the store; the block’s foDelay is the offset of the BLIP in the
WordDocument stream. The viewer draws pictures reached this way; shapes without a
pib (lines, boxes, text-box frames, WordArt) are shown as [drawing].
Embedded objects
An embedded OLE object is a storage inside ObjectPool, named from the
sprmCPicLocation value with an underscore in front. Its
CompObj stream gives its type name. The object’s own streams are kept as
they are, ready for the program that made it.
Comments
PlcfandRefgives the CP of each comment’s reference and an author record for it.PlcfandTxtlocates each comment’s text in the comment story.