Doc (computing)#Microsoft Word Binary File Format
{{short description|Filename extension}}
{{Infobox file format
| name = Word Document
| icon = .doc icon.svg
| iconcaption = Icon as used in Microsoft Word 9.0 and 2002
| extension = doc
| mime = application/msword{{cite web |url=https://www.iana.org/assignments/media-types/application/msword |title=IME Content-Type/Subtype - application/msword |publisher=IANA |date=1993-07-22 |access-date=2012-06-20}}
| magic =
| standard =
| open = Yes
| url =
| logo =
| type code =
| uniform type = com.microsoft.word.doc{{citation |url=https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/UTIRef/UTIRef.pdf |title=Uniform Type Identifiers Reference |publisher=Apple |access-date=2012-06-20}}{{cite web |url=https://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/utilist/chapter_4_section_1.html#//apple_ref/doc/uid/TP40001319-CH205-BHACGADF
|title=System-Declared Uniform Type Identifiers (Mac OS X v10.4)
|date=2008-04-08
|work=Apple Developer Connection
|publisher=Apple Inc.}}
| owner = Microsoft
| latest release version = 12.0
| latest release date = {{Start date and age|2024|8|20|df=yes}}
| genre = document file format
| container for = Text, Image,Table
| contained by =
| extended from = Compound File Binary Format (since 97)
| extended to = Microsoft Office XML formats, Office Open XML
}}
.doc (an abbreviation of "document") is a filename extension used for word processing documents stored on Microsoft's proprietary Microsoft Word Binary File Format; it was the primary format for Microsoft Word until the 2007 version replaced it with Office Open XML .docx
files. Microsoft has used the extension since 1983.
Overview
Binary DOC files often contain more text formatting information (as well as scripts and undo information) than some other document file formats like Rich Text Format and Hypertext Markup Language, but are usually less widely compatible.
The DOC files created with Microsoft Word versions differ: Word for Windows 1.0 and 2.0 uses a format that was changed in the following Word 6.0 and 95 ("7.0") releases. DOC was changed once again into an OLE and CFBF-based format used from Word 97 ("8.0") to 2003 ("11.0"). Word for MS-DOS used its own specific DOC format.{{Cite web |title=Configuring the File Block Settings |url=https://www.ibm.com/docs/en/strategicsm/10.1.1?topic=settings-configuring-file-block |access-date=2024-12-03 |website=www.ibm.com |language=en-us}}
In order to allow users of Word 6.0 and Word 95 to be able to open and read documents created in the newer (97–2003) format, Microsoft released the downloadable Word 97 Import Converter.{{Cite web |title=WD: Word 97 Import Converter: How to Do an Administrative Setup |url=https://helparchive.huntertur.net/document/57119 |access-date=2024-12-04 |website=helparchive.huntertur.net}}{{Cite web |date=2002-10-09 |title=Q162214 - WD: How to Obtain the Word 97-2000 Import Converter |url=https://support.microsoft.com/default.aspx?scid=kb;en-us;Q162214 |url-status=dead |archive-url=https://web.archive.org/web/20021009230952/https://support.microsoft.com/default.aspx?scid=kb;en-us;Q162214 |archive-date=2002-10-09 |access-date=2024-12-03 |website=Microsoft}}
In Microsoft Word 2007 and later, the binary file format was replaced as the default format by the Office Open XML (.docx
) format, though Microsoft Word can still produce and open DOC files. Microsoft released the Office Compatibility Pack allowing users of Word 2003, 2002, 2000 and 97 to open the new format as well as edit and save them.{{Cite web |date=2006-12-06 |title=Download details: Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats |url=http://www.microsoft.com/downloads/details.aspx?familyid=941b3470-3ae9-4aee-8f43-c6bb74cd1466&displaylang=en |access-date=2024-12-03 |website=Microsoft|archive-url=https://web.archive.org/web/20061206161051/http://www.microsoft.com/downloads/details.aspx?familyid=941b3470-3ae9-4aee-8f43-c6bb74cd1466&displaylang=en |archive-date=6 December 2006 }} Modern versions of Word can also open documents in the pre-97 DOC formats, but should be manually enabled in the File Block Settings.
Application support
{{See also|Comparison of word processors}}
The DOC format is native to Microsoft Word. Other word processors, such as OpenOffice.org Writer, IBM Lotus Symphony, Apple Pages and AbiWord, can also create and read DOC files, although with some limitations. Command line programs for Unix-like operating systems that can convert files from the DOC format to plain text or other standard formats include the wv library, which itself is used directly by AbiWord.
Specification
Because the DOC file format was a closed specification for many years, inconsistent handling of the format persists and may cause some loss of formatting information when handling the same file with multiple word processing programs. Some specifications for Microsoft Office 97 binary file formats were published in 1997 under a restrictive license, but these specifications were removed from online download in 1999.{{cite web |url=http://marketing.openoffice.org/ooocon2006/presentations/wednesday_o3.pdf |title=Comparing ODF and OOXML |year=2006 |access-date=2011-05-23 |archive-date=2011-09-28 |archive-url=https://web.archive.org/web/20110928034821/http://marketing.openoffice.org/ooocon2006/presentations/wednesday_o3.pdf |url-status=dead }}{{citation |url=http://www.robweir.com/blog/2006/11/beware-of-geeks-bearing-gifts.html |title=Beware of Geeks Bearing Gifts |year=2006 |access-date=2011-05-23}}{{cite web |url=http://ftp.gwdg.de/pub/gnu/www/software/mswordview/MSWordView.html |title=A Word 8 converter for Unix |access-date=2011-05-23}}{{cite web |url=http://www.opennet.ru/docs/formats/wword8.html#01 |title=Microsoft Word 97 Binary File Format |access-date=2011-05-23}} Specifications of later versions of Microsoft Office binary file formats were not publicly available. The DOC format specification was available from Microsoft on request{{cite web |url=http://www.wictorwilen.se/Post/Royaltyfree-specifications-for-Microsoft-Office-binary-file-formats.aspx |title=Royalty-free specifications for Microsoft Office binary file formats |date=4 September 2007 |access-date=2011-05-23}} since 2006{{cite web |url=http://blogs.msdn.com/b/brian_jones/archive/2008/01/16/mapping-documents-in-the-binary-format-doc-xls-ppt-to-the-open-xml-format.aspx |title=Mapping documents in the binary format (.doc; .xls; .ppt) to the Open XML format |date=2008-01-16 |access-date=2011-05-23}} under restrictive RAND-Z terms until February 2008. Sun Microsystems and OpenOffice.org reverse engineered the file format.{{cite web|url=http://sc.openoffice.org/compdocfileformat.pdf|title=Microsoft Compound Document Format|date=2007-08-07|work=OpenOffice.org}} On February 15, 2008, Microsoft released a .DOC format specification{{citation | url=http://msdn.microsoft.com/en-us/library/cc313153%28v=office.12%29 |title=MS-DOC: Word (.doc) Binary File Format |date=2019-11-19|access-date=2020-02-25}}{{citation |url=http://www.microsoft.com/interop/docs/officebinaryformats.mspx |archive-url=https://web.archive.org/web/20080218212338/http://www.microsoft.com/interop/docs/officebinaryformats.mspx |title=Microsoft Office Binary (doc, xls, ppt) File Formats |date=2008-02-15 |archive-date=2008-02-18}}{{cite web|url=http://download.microsoft.com/download/0/B/E/0BE8BDD7-E5E8-422A-ABFD-4342ED7AD886/Word97-2007BinaryFileFormat(doc)Specification.pdf|title=Microsoft Office Word 97 - 2007 Binary File Format Specification (*.doc)|year=2008|work=Microsoft Corporation }} under the Microsoft Open Specification Promise.{{cite web|url=http://www.microsoft.com/interop/osp/default.mspx|title=Microsoft Open Specification Promise|date=March 23, 2009|work=Microsoft Corporation}}{{cite web |url=http://support.microsoft.com/kb/840817/en-us |title=How to extract information from Office files by using Office file formats and schemas |access-date=2011-05-23}} However, this specification does not describe all of the features used by DOC format and reverse engineered work remains necessary.{{cite web |url=http://www.joelonsoftware.com/items/2008/02/19.html |title=Why are the Microsoft Office file formats so complicated? (And some workarounds) |author=Joel Spolsky |date=19 February 2008 |access-date=2011-05-23 |archive-url=https://web.archive.org/web/20131014090710/http://joelonsoftware.com/items/2008/02/19.html |archive-date=2013-10-14}} Since 2008 the specification has been updated several times; the latest change was made in May 2022.
The format used in earlier, pre-97 ("1.0" 1989 through "7.0" 1995) versions of Word are less known, but both OpenOffice and LibreOffice contain open-source code for reading these formats. The format is probably related to the "Stream" format found in similar Excel versions.{{cite web |title=LibreOffice/core |url=https://github.com/LibreOffice/core/blob/eaeabd78585c185e58f62be49e5888ef78d94793/sw/source/ui/uno/swdetect.cxx#L68 |website=GitHub |language=en}} Word 95 also seems to have an OLE-wrapped form.
Other .doc file formats
Some historical documentations may use the DOC filename extension for plain-text files, indicating documentation for software or hardware. The DOC filename extension was also used during the 1980s by WordPerfect for its proprietary format.{{Citation needed|date=December 2024}}
DOC is sometimes used by users of Palm OS as shorthand for PalmDoc, an unrelated format (commonly using PDB filename extension) used to encode text files such as ebooks.{{Citation needed|date=December 2024}}
See also
- docx, the file format used by modern versions of Word
- De facto standard
- Dominant design
References
{{reflist}}
External links
- [http://msdn.microsoft.com/en-us/library/cc313105(v=office.12).aspx DOC], XLS, and PPT specifications
- [http://sc.openoffice.org/compdocfileformat.pdf Microsoft Compound Document Format] - OpenOffice.org
{{Office document file formats}}