[MS-ONE]: OneNote File Format Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages, standards as well as overviews of the interaction among each of these technologies. Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you may make copies of it in order to develop implementations of the technologies described in the Open Specifications and may distribute portions of it in your implementations using these technologies or your documentation as necessary to properly document the implementation. You may also distribute in your implementation, with or without modification, any schema, IDL’s, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications. No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation. Patents. Microsoft has patents that may cover your implementations of the technologies described in the Open Specifications. Neither this notice nor Microsoft's delivery of the documentation grants any licenses under those or any other Microsoft patents. However, a given Open Specification may be covered by Microsoft Open Specification Promise or the Community Promise. If you would prefer a written license, or if the technologies described in the Open Specifications are not covered by the Open Specifications Promise or Community Promise, as applicable, patent licenses are available by contacting [email protected]. Trademarks. The names of companies and products contained in this documentation may be covered by trademarks or similar intellectual property rights. This notice does not grant any licenses under those rights. Fictitious Names. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted in this documentation are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred. Reservation of Rights. All other rights are reserved, and this notice does not grant any rights other than specifically described above, whether by implication, estoppel, or otherwise. Tools. The Open Specifications do not require the use of Microsoft programming tools or programming environments in order for you to develop an implementation. If you have access to Microsoft programming tools and environments you are free to take advantage of them. Certain Open Specifications are intended for use in conjunction with publicly available standard specifications and network programming art, and assumes that the reader either is familiar with the aforementioned material or has immediate access to it. 1 / 113 [MS-ONE] — v20120630 OneNote File Format Copyright © 2012 Microsoft Corporation. Release: July 16, 2012 Revision Summary Revision Revision Date History Class Comments 07/13/2009 0.1 Major Initial Availability 08/28/2009 0.2 Editorial Revised and edited the technical content 11/06/2009 0.3 Editorial Revised and edited the technical content 02/19/2010 1.0 Minor Updated the technical content 03/31/2010 1.01 Editorial Revised and edited the technical content 04/30/2010 1.02 Editorial Revised and edited the technical content 06/07/2010 1.03 Major Updated and revised the technical content 06/29/2010 1.04 Editorial Changed language and formatting in the technical content. 07/23/2010 1.04 No change No changes to the meaning, language, or formatting of the technical content. 09/27/2010 1.04 No change No changes to the meaning, language, or formatting of the technical content. 11/15/2010 1.04 No change No changes to the meaning, language, or formatting of the technical content. 12/17/2010 1.04 No change No changes to the meaning, language, or formatting of the technical content. 03/18/2011 1.04 No change No changes to the meaning, language, or formatting of the technical content. 06/10/2011 1.04 No change No changes to the meaning, language, or formatting of the technical content. 01/20/2012 1.5 Minor Clarified the meaning of the technical content. 04/11/2012 1.5 No change No changes to the meaning, language, or formatting of the technical content. 07/16/2012 1.5 No change No changes to the meaning, language, or formatting of the technical content. 2 / 113 [MS-ONE] — v20120630 OneNote File Format Copyright © 2012 Microsoft Corporation. Release: July 16, 2012 Table of Contents 1 Introduction ............................................................................................................. 8 1.1 Glossary ............................................................................................................... 8 1.2 References ............................................................................................................ 8 1.2.1 Normative References ....................................................................................... 8 1.2.2 Informative References ..................................................................................... 9 1.3 Structure Overview (Synopsis) ................................................................................ 9 1.3.1 Section ......................................................................................................... 10 1.3.2 Page ............................................................................................................. 10 1.3.2.1 Outline .................................................................................................... 10 1.3.2.2 Outline Element ........................................................................................ 10 1.3.3 Properties and Property Sets ........................................................................... 10 1.3.4 Notebook ...................................................................................................... 10 1.4 Relationship to Protocols and Other Structures ........................................................ 10 1.5 Applicability Statement ......................................................................................... 10 1.6 Versioning and Localization ................................................................................... 11 1.7 Vendor-Extensible Fields ....................................................................................... 11 2 Structures .............................................................................................................. 12 2.1 Fundamental Concepts ......................................................................................... 12 2.1.1 Conflict Object ............................................................................................... 12 2.1.2 Conflict Page ................................................................................................. 12 2.1.3 ContextID ..................................................................................................... 12 2.1.4 Character Position (CP) ................................................................................... 12 2.1.5 File Data Object ............................................................................................. 13 2.1.6 ObjectID ....................................................................................................... 13 2.1.7 ObjectSpaceID ............................................................................................... 13 2.1.8 Root Object ................................................................................................... 13 2.1.9 Note Tag ....................................................................................................... 14 2.1.10 PageObjectSpace .......................................................................................... 14 2.1.11 ConflictPageObjectSpace ............................................................................... 14 2.1.12 Properties .................................................................................................... 14 2.1.13 Property Sets ............................................................................................... 20 2.1.14 SectionObjectSpace ...................................................................................... 21 2.1.15 Table of Contents (TOC) ................................................................................ 21 2.1.16 Title ............................................................................................................ 21 2.1.17 Version History Page ..................................................................................... 22 2.1.18 VersionHistoryObjectSpace ............................................................................ 22 2.2 Complex Types .................................................................................................... 22 2.2.1 Color ............................................................................................................ 22 2.2.2 COLORREF..................................................................................................... 22 2.2.3 WzInAtom ..................................................................................................... 23 2.2.4 ArrayOfUINT8s ............................................................................................... 23 2.2.5 ArrayOfUINT32s ............................................................................................. 23 2.2.6 GuidInAtom ................................................................................................... 24 2.2.7 ArrayOfGuids ................................................................................................. 24 2.2.8 jcidPersistablePropertyContainerForTOC ............................................................ 24 2.2.9 jcidPersistablePropertyContainerForTOCSection .................................................. 24 2.2.10 jcidReadOnlyPersistablePropertyContainerForAuthor ......................................... 25 2.2.11 jcidSectionNode ........................................................................................... 25 2.2.12 jcidPageSeriesNode ...................................................................................... 25 3 / 113 [MS-ONE] — v20120630 OneNote File Format Copyright © 2012 Microsoft Corporation. Release: July 16, 2012 2.2.13 jcidPageNode ............................................................................................... 26 2.2.14 jcidOutlineNode ............................................................................................ 27 2.2.15 jcidOutlineElementNode ................................................................................ 29 2.2.16 jcidOutlineGroup .......................................................................................... 30 2.2.17 jcidRichTextOENode ...................................................................................... 30 2.2.18 jcidImageNode ............................................................................................. 32 2.2.19 jcidNumberListNode ...................................................................................... 33 2.2.20 jcidTableNode .............................................................................................. 34 2.2.21 jcidTableRowNode ........................................................................................ 35 2.2.22 jcidTableCellNode ......................................................................................... 35 2.2.23 jcidTitleNode ................................................................................................ 36 2.2.24 jcidPageMetaData ......................................................................................... 37 2.2.25 jcidSectionMetaData ..................................................................................... 37 2.2.26 jcidEmbeddedFileNode .................................................................................. 38 2.2.27 jcidEmbeddedFileContainer ............................................................................ 39 2.2.28 jcidPageManifestNode ................................................................................... 40 2.2.29 jcidConflictPageMetaData .............................................................................. 40 2.2.30 jcidPictureContainer14 .................................................................................. 41 2.2.31 jcidVersionHistoryContent .............................................................................. 41 2.2.32 jcidVersionProxy ........................................................................................... 41 2.2.33 jcidRevisionMetaData .................................................................................... 42 2.2.34 jcidVersionHistoryMetaData ........................................................................... 42 2.2.35 jcidNoteTagSharedDefinitionContainer ............................................................. 42 2.2.36 NoteTagState ............................................................................................... 43 2.2.37 jcidParagraphStyleObjectForText .................................................................... 44 2.2.38 jcidParagraphStyleObject............................................................................... 45 2.2.39 FontColor .................................................................................................... 46 2.2.40 ContentChildNodesOfOutlineElement ............................................................... 46 2.2.41 ContentChildNodesOfPageManifest .................................................................. 46 2.2.42 ElementChildNodesOfSection ......................................................................... 47 2.2.43 ElementChildNodesOfPage ............................................................................. 47 2.2.44 ElementChildNodesOfTitle .............................................................................. 47 2.2.45 ElementChildNodesOfOutline .......................................................................... 48 2.2.46 ElementChildNodesOfOutlineElement .............................................................. 48 2.2.47 ElementChildNodesOfTable ............................................................................ 48 2.2.48 ElementChildNodesOfTableRow ...................................................................... 49 2.2.49 ElementChildNodesOfTableCell ....................................................................... 49 2.2.50 ElementChildNodesOfVersionHistory ............................................................... 49 2.2.51 ListNodes .................................................................................................... 49 2.2.52 NotebookManagementEntityGuid .................................................................... 50 2.2.53 PictureContainer ........................................................................................... 50 2.2.54 AudioRecordingGuid ...................................................................................... 50 2.2.55 AudioRecordingGuids .................................................................................... 51 2.2.56 CachedTitleString ......................................................................................... 51 2.2.57 CachedTitleStringFromPage ........................................................................... 51 2.2.58 StructureElementChildNodes .......................................................................... 51 2.2.59 ChildGraphSpaceElementNodes ...................................................................... 52 2.2.60 TableColumnWidths ...................................................................................... 52 2.2.61 Author ........................................................................................................ 52 2.2.62 AuthorOriginal .............................................................................................. 53 2.2.63 AuthorMostRecent ........................................................................................ 53 2.2.64 TableColumnsLocked ..................................................................................... 53 2.2.65 EmbeddedFileName ...................................................................................... 53 4 / 113 [MS-ONE] — v20120630 OneNote File Format Copyright © 2012 Microsoft Corporation. Release: July 16, 2012 2.2.66 SourceFilepath ............................................................................................. 54 2.2.67 ConflictingUserName ..................................................................................... 54 2.2.68 ConflictingUserInitials ................................................................................... 54 2.2.69 ImageFilename ............................................................................................ 54 2.2.70 TextRunIndex .............................................................................................. 55 2.2.71 TextRunFormatting ....................................................................................... 55 2.2.72 WzHyperlinkUrl ............................................................................................ 55 2.2.73 ImageAltText ............................................................................................... 56 2.2.74 ParagraphStyle............................................................................................. 56 2.2.75 MetaDataObjectsAboveGraphSpace ................................................................ 56 2.2.76 TextRunDataObject ....................................................................................... 56 2.2.77 ParagraphStyleId .......................................................................................... 57 2.2.78 NoteTagHighlightColor................................................................................... 57 2.2.79 NoteTagTextColor ......................................................................................... 57 2.2.80 VersionHistoryGraphSpaceContextNodes ......................................................... 58 2.2.81 VersionContextNodes .................................................................................... 58 2.2.82 NoteTagStates ............................................................................................. 58 2.2.83 TextExtendedAscii ........................................................................................ 58 2.2.84 TextRunData ................................................................................................ 59 2.2.85 SectionDisplayName ..................................................................................... 59 2.2.86 NextStyle .................................................................................................... 59 2.2.87 FileIdentityGuid ............................................................................................ 60 2.2.88 FolderChildFilename ...................................................................................... 60 2.2.89 NotebookColor ............................................................................................. 60 2.2.90 TOCEntryIndex_OidIndex .............................................................................. 60 2.3 Simple Types ...................................................................................................... 61 2.3.1 Time32 ......................................................................................................... 61 2.3.2 LayoutAlignment ............................................................................................ 61 2.3.3 ObjectSpaceOfVersionHistory ........................................................................... 62 2.3.4 ObjectSpaceOfVersion ..................................................................................... 62 2.3.5 LayoutTightLayout .......................................................................................... 63 2.3.6 PageWidth ..................................................................................................... 63 2.3.7 PageHeight .................................................................................................... 63 2.3.8 OutlineElementChildLevel ................................................................................ 63 2.3.9 Bold.............................................................................................................. 63 2.3.10 Italic ........................................................................................................... 63 2.3.11 Underline..................................................................................................... 64 2.3.12 Strikethrough ............................................................................................... 64 2.3.13 Superscript .................................................................................................. 64 2.3.14 Subscript ..................................................................................................... 64 2.3.15 Font ............................................................................................................ 64 2.3.16 FontSize ...................................................................................................... 64 2.3.17 Highlight ..................................................................................................... 65 2.3.18 RgOutlineIndentDistance ............................................................................... 65 2.3.19 BodyTextAlignment ....................................................................................... 65 2.3.20 OffsetFromParentHoriz .................................................................................. 65 2.3.21 OffsetFromParentVert ................................................................................... 65 2.3.22 NumberListFormat ........................................................................................ 66 2.3.23 LayoutMaxWidth ........................................................................................... 66 2.3.24 LayoutMaxWidthInOutline .............................................................................. 67 2.3.25 LayoutMaxHeight .......................................................................................... 67 2.3.26 LayoutMaxHeightInOutline ............................................................................. 67 2.3.27 RichEditTextUnicode ..................................................................................... 67 5 / 113 [MS-ONE] — v20120630 OneNote File Format Copyright © 2012 Microsoft Corporation. Release: July 16, 2012 2.3.28 OutlineElementRTL ....................................................................................... 67 2.3.29 LanguageID ................................................................................................. 68 2.3.30 LayoutAlignmentInParent .............................................................................. 68 2.3.31 ListFont ....................................................................................................... 68 2.3.32 PageMarginTop............................................................................................. 68 2.3.33 PageMarginBottom ....................................................................................... 68 2.3.34 PageMarginLeft ............................................................................................ 69 2.3.35 PageMarginRight .......................................................................................... 69 2.3.36 TopologyCreationTimeStamp.......................................................................... 69 2.3.37 LayoutAlignmentSelf ..................................................................................... 69 2.3.38 IsTitleTime .................................................................................................. 69 2.3.39 IsBoilerText ................................................................................................. 70 2.3.40 PageSize ..................................................................................................... 70 2.3.41 PortraitPage ................................................................................................. 71 2.3.42 EnforceOutlineStructure ................................................................................ 71 2.3.43 EditRootRTL ................................................................................................. 71 2.3.44 CannotBeSelected ........................................................................................ 71 2.3.45 IsTitleText ................................................................................................... 71 2.3.46 IsTitleDate ................................................................................................... 72 2.3.47 ListRestart ................................................................................................... 72 2.3.48 IsLayoutSizeSetByUser.................................................................................. 72 2.3.49 ListSpacingMu .............................................................................................. 72 2.3.50 LayoutOutlineReservedWidth ......................................................................... 72 2.3.51 LayoutResolveChildCollisions .......................................................................... 73 2.3.52 IsReadOnly .................................................................................................. 73 2.3.53 LayoutMinimumOutlineWidth .......................................................................... 73 2.3.54 LayoutCollisionPriority ................................................................................... 73 2.3.55 DescendantsCannotBeMoved.......................................................................... 73 2.3.56 AudioRecordingDuration ................................................................................ 73 2.3.57 RichEditTextLangID ...................................................................................... 74 2.3.58 LayoutTightAlignment ................................................................................... 74 2.3.59 Charset ....................................................................................................... 74 2.3.60 CreationTimeStamp ...................................................................................... 75 2.3.61 Deletable ..................................................................................................... 75 2.3.62 ListMSAAIndex ............................................................................................. 75 2.3.63 PageMarginOriginX ....................................................................................... 77 2.3.64 PageMarginOriginY ........................................................................................ 77 2.3.65 IsBackground ............................................................................................... 77 2.3.66 IRecordMedia ............................................................................................... 77 2.3.67 RowCount .................................................................................................... 78 2.3.68 ColumnCount ............................................................................................... 78 2.3.69 TableBordersVisible ...................................................................................... 78 2.3.70 LastModifiedTimeStamp ................................................................................ 78 2.3.71 LastModifiedTime .......................................................................................... 78 2.3.72 IsConflictPage .............................................................................................. 78 2.3.73 SchemaRevisionInOrderToRead ...................................................................... 79 2.3.74 IsConflictObjectForRender ............................................................................. 79 2.3.75 HasConflictPages .......................................................................................... 79 2.3.76 EmbeddedFileContainer ................................................................................. 79 2.3.77 IsConflictObjectForSelection ........................................................................... 79 2.3.78 IsDeletedGraphSpaceContent ......................................................................... 80 2.3.79 PageLevel .................................................................................................... 80 2.3.80 Hyperlink ..................................................................................................... 80 6 / 113 [MS-ONE] — v20120630 OneNote File Format Copyright © 2012 Microsoft Corporation. Release: July 16, 2012 2.3.81 Hidden ........................................................................................................ 80 2.3.82 HyperlinkProtected ....................................................................................... 80 2.3.83 UnderlineType .............................................................................................. 81 2.3.84 TextRunIsEmbeddedObject ............................................................................ 81 2.3.85 MathFormatting ............................................................................................ 81 2.3.86 ParagraphSpaceBefore .................................................................................. 81 2.3.87 ParagraphSpaceAfter .................................................................................... 81 2.3.88 ParagraphLineSpacingExact ........................................................................... 82 2.3.89 HasVersionPages .......................................................................................... 82 2.3.90 ActionItemType ............................................................................................ 82 2.3.91 NoteTagShape.............................................................................................. 82 2.3.92 NoteTagLabel ............................................................................................... 88 2.3.93 NoteTagPropertyStatus ................................................................................. 88 2.3.94 TaskTagDueDate .......................................................................................... 89 2.3.95 NoteTagCreated ........................................................................................... 89 2.3.96 NoteTagCompleted ....................................................................................... 89 2.3.97 ActionItemStatus .......................................................................................... 89 2.3.98 ActionItemSchemaVersion ............................................................................. 90 2.3.99 ReadingOrderRTL ......................................................................................... 90 2.3.100 ParagraphAlignment .................................................................................... 90 2.3.101 DisplayedPageNumber ................................................................................. 90 2.3.102 NoteTagDefinitionOid .................................................................................. 91 2.3.103 SchemaRevisionInOrderToWrite .................................................................... 91 2.3.104 WebPictureContainer14 ............................................................................... 91 2.3.105 ImageUploadState ...................................................................................... 91 2.3.106 PictureWidth .............................................................................................. 92 2.3.107 PictureHeight ............................................................................................. 92 2.3.108 NotebookElementOrderingID ........................................................................ 92 2.3.109 EnableHistory ............................................................................................. 92 3 Structure Examples ................................................................................................ 93 3.1 Example of a Section and Page .............................................................................. 93 4 Security Considerations ........................................................................................ 102 5 Appendix A: Product Behavior .............................................................................. 103 6 Change Tracking................................................................................................... 105 7 Index ................................................................................................................... 106 7 / 113 [MS-ONE] — v20120630 OneNote File Format Copyright © 2012 Microsoft Corporation. Release: July 16, 2012 1 Introduction This document specifies the OneNote File Format, which is a persistence format for storing digital notes as hierarchical sets of sections and pages. Pages can contain text, images, tables, note tags, and other types of user-defined content. Sections 1.7 and 2 of this specification are normative and can contain the terms MAY, SHOULD, MUST, MUST NOT, and SHOULD NOT as defined in RFC 2119. All other sections and examples in this specification are informative. 1.1 Glossary The following terms are defined in [MS-GLOS]: ASCII Coordinated Universal Time (UTC) GUID language code identifier (LCID) Unicode The following terms are defined in [MS-OFCGLOS]: character set device-independent bitmap (DIB) file data object font Joint Photographic Experts Group (JPEG) onefiles folder Portable Network Graphics (PNG) red-green-blue (RGB) rich text right-to-left style TIFF Windows Metafile Format (WMF) The following terms are specific to this document: MAY, SHOULD, MUST, SHOULD NOT, MUST NOT: These terms (in all caps) are used as described in [RFC2119]. All statements of optional behavior use either MAY, SHOULD, or SHOULD NOT. 1.2 References References to Microsoft Open Specifications documentation do not include a publishing year because links are to the latest version of the technical documents, which are updated frequently. References to other documents include a publishing year when one is available. 1.2.1 Normative References We conduct frequent surveys of the normative references to assure their continued availability. If you have any issue with finding a normative reference, please contact [email protected]. We will assist you in finding the relevant information. Please check the archive site, http://msdn2.microsoft.com/en-us/library/E4BD6494-06AD-4aed-9823-445E921C9624, as an additional source. 8 / 113 [MS-ONE] — v20120630 OneNote File Format Copyright © 2012 Microsoft Corporation. Release: July 16, 2012 [MS-DOC] Microsoft Corporation, "Word Binary File Format (.doc) Structure Specification". [MS-DTYP] Microsoft Corporation, "Windows Data Types". [MS-LCID] Microsoft Corporation, "Windows Language Code Identifier (LCID) Reference". [MS-ONESTORE] Microsoft Corporation, "OneNote Revision Store File Format Specification". [MS-OSHARED] Microsoft Corporation, "Office Common Data Types and Objects Structure Specification". [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997, http://www.rfc-editor.org/rfc/rfc2119.txt 1.2.2 Informative References [MS-GLOS] Microsoft Corporation, "Windows Protocols Master Glossary". [MS-OFCGLOS] Microsoft Corporation, "Microsoft Office Master Glossary". 1.3 Structure Overview (Synopsis) This file format is a persistence format that is designed for taking digital notes and storing those notes in a Microsoft OneNote revision store file, as described in [MS-ONESTORE]. This file format provides an effective way to represent digital notes as hierarchical sets of sections and pages that contain user-defined content. The following diagram illustrates the data model for this file format. Figure 1: Data model of the OneNote File Format 9 / 113 [MS-ONE] — v20120630 OneNote File Format Copyright © 2012 Microsoft Corporation. Release: July 16, 2012 1.3.1 Section A section is a container for specific sets of pages, metadata, and properties. Metadata and properties include the section name, identification of the pages that are contained in the section, and the order in which those pages appear. The term "section" refers to all of the pages that are in a section and the representation of that data in a OneNote® revision store file, which has a .one file name extension. For more information about sections, see section 2.2.11. 1.3.2 Page A page is a container for user-defined content, including text, lists, tables, page titles, images, and note tags. Most types of content are entered and contained in an outline object that is contained in a page. However, some types of content can be entered directly onto a page. Pages can be organized in a hierarchical system with different levels of subpages. All pages are referenced through a page series, where the first page in a page series is the top-level page, and all subsequent pages in a page series are subpages of the top-level page. For more information about pages, see section 2.2.13. 1.3.2.1 Outline An outline is a container for most types of user-defined content, including text, lists, tables, and images. An outline can appear anywhere on a page and it can overlap with other outlines. A page is not required to contain one or more outlines, although most pages contain at least one outline. For more information about outlines, see section 2.2.14. 1.3.2.2 Outline Element An outline element is a container for a set of content in an outline. Each outline contains one or more outline elements. For more information about outline elements, see section 2.2.15. 1.3.3 Properties and Property Sets All of the content in a OneNote® revision store (.one) file consists of properties (section 2.1.12), property sets (section 2.1.13), and file data objects (section 2.1.5). A property set is a collection of properties that represents some type of content. A file data object is a block of binary data that contains pictures, embedded files, or audio/video content. 1.3.4 Notebook A notebook is a collection of section files that are stored in the same directory. A table-of-contents file (section 2.1.15) defines a notebook by using a collection of properties, which specify settings such as the order of sections within the notebook and the color of the notebook. 1.4 Relationship to Protocols and Other Structures This file format is based on the OneNote revision store file format, as described in [MS-ONESTORE]. 1.5 Applicability Statement This document specifies a persistence format for digital notes, which are stored as collections of sections and pages. Pages can contain text, images, tables, note tags, and other types of user- defined content. This persistence format is applicable when the primary presentation format for note content is electronic. 10 / 113 [MS-ONE] — v20120630 OneNote File Format Copyright © 2012 Microsoft Corporation. Release: July 16, 2012