MICROSOFT OFFICE WORD 97-2007
BINARY FILE FORMAT SPECIFICATION
[*.doc]
Includes Binary File Format Documentation
Relevant To:
Microsoft Office Word 2007
Microsoft Office Word 2003
Microsoft Office Word 2002
Microsoft Office Word 2000
Microsoft Office Word 1997
Microsoft Office Word 97-2007 Binary File Format (.doc) Specification Page 1 of 210
Microsoft Office Word 97-2007
Binary File Format (.doc) Specification
NOTICE
This specification is provided under the Microsoft Open Specification Promise. For further
details on the Microsoft Open Specification Promise, please refer to:
http://www.microsoft.com/interop/osp/default.mspx. You are free to copy, display and
perform this specification, to make derivative works of this specification, and to distribute the
specification, however distribution rights are limited to unmodified copies of the original
specification and any redistributed copies of the specification must retain its attribution of
Microsoft’s rights in the copyright of the specification, this full notice, and the URL to the
webpage containing the most current version of the specification as provided by Microsoft.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in these materials. Except as expressly provided in the
Microsoft Open Specification Promise and this notice, the furnishing of these materials does
not give you any license to these patents, trademarks, copyrights, or other intellectual
property.
The information contained in this document represents the point-in-time view of Microsoft
Corporation on the issues discussed as of the date of publication. Because Microsoft must
respond to changing market conditions, it should not be interpreted to be a commitment on
the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information
presented after the date of authoring.
Unless otherwise noted, the example companies, organizations, products, domain names,
e-mail addresses, logos, people, places and events depicted herein are fictitious, and no
association with any real company, organization, product, domain name, email address, logo,
person, place or event is intended or should be inferred.
©2007 Microsoft Corporation. All rights reserved.
Microsoft Office Word 97-2007 Binary File Format (.doc) Specification Page 2 of 210
Microsoft, Windows, Windows NT, Windows Server, and Windows Vista are either registered
trademarks or trademarks of Microsoft Corporation in the United States and/or other
countries.
Microsoft Office Word 97-2007 Binary File Format (.doc) Specification Page 3 of 210
Microsoft Office Word 97-2007 Binary File Format (.doc) Specification Page 4 of 210
Table of Contents
Table of Contents ....................................................................................................... 4
Note ......................................................................................................................... 8
Additions to Word 2007............................................................................................... 8
Word and .Doc Files .................................................................................................... 8
Definitions ............................................................................................................... 10
Naming Conventions ................................................................................................. 20
Format of the Summary Info Stream in a Word File ...................................................... 21
Format of the Main Stream in a Word Non-Complex File ................................................ 21
Format of the Main Stream in a Complex File ............................................................... 22
Format of the Table Stream ....................................................................................... 22
Format of the Data Stream ........................................................................................ 27
Format of the Custom XML Storage (Added in Word 2007) ............................................ 28
FIB ......................................................................................................................... 28
Text ....................................................................................................................... 29
Character and Paragraph Formatting Properties ........................................................... 32
Bin Tables ............................................................................................................... 34
Style Sheet ............................................................................................................. 34
STSHI ....................................................................................................... 36
Introduced in Word 2003: ........................................................................... 37
STD .......................................................................................................... 38
List Tables ............................................................................................................... 47
LST Records and the rglst .............................................................................. 47
List Names and the sttbListNames ................................................................... 48
LFO Records and the pllfo .............................................................................. 48
Paragraph List Formatting .............................................................................. 48
SPRM Definitions ...................................................................................................... 49
Paragraph SPRMs .......................................................................................... 50
Character SPRMs .......................................................................................... 56
Picture SPRMs .............................................................................................. 62
Section SPRMs .............................................................................................. 63
Table sprms ................................................................................................. 66
Complex SPRMs ............................................................................................ 72
Complex Paragraph SPRMs .......................................................................... 72
Complex Character SPRMs ........................................................................... 75
Complex Picture SPRMs ............................................................................... 78
Complex Section SPRMs .............................................................................. 78