Download OneNote. Get OneNote on your PC and Macintosh for Free. Works on Windows 7 or later and OS X Yosemite 10.10 or later. Capture thoughts, ideas, and to-dos and sync them to all your devices. Store and share your notebooks on OneDrive with your free Microsoft account. Doesn't expire - use OneNote for as long as you like. To unlock a section, select the locked section and enter your password. Follow the same process when removing passwords. Right-click on the section and choose ‘Password Protection’ then ‘Remove Password’. Click ‘OK’ after entering your password. Microsoft’s OneNote is your go-to note-taking app. Better yet, it is free. A typical OneNote notebook is made up of one or more notebook sections. Within each section are the individual pages and subpages on which you take notes. OneNote isn't limited to any particular organizational style. You can organize your notes in any way you like, and if you change your mind, it's easy to change the way your notes are organized.
Home > Sample chapters > Microsoft Office > Other applications
- 5/15/2013
- Creating and organizing pages
Creating and organizing pages
The real york in OneNote gets done on pages. All the rest (notebooks, sections, section groups) are just a framework to help organize those pages. Everything we talk about when it comes to typing notes or inserting images or ink happens on pages.
Creating a page is quite simple:
At the top of the page list on the right side of the screen, click Add Page. A new page is created.
As with sections and section groups, your page will have a default name; for example, Untitled Page, which you are encouraged to change. There are several ways to rename your page:
Right-click the page tab and select Rename
Click in the page title area of the page (above the horizontal line) and enter a name for your page.
Enter some text on the page. In the absence of a formal name, OneNote will use whatever the first line of text is for the title of the page.
After you’ve created your page, you can change the order by dragging it up or down in the page list on the right side of the window.
After the page is created, click anywhere on the page to begin adding notes and content.
Creating subpages
A subpage is a regular page that is indented a bit in the page list in order to show that it is a subpage of the page above it. Do you have to use subpages? No, but you might want to, because an organizational construct will separate related data onto multiple pages.
To create a subpage, follow these steps:
Create a new page, as described previously, below the page where you want the subpage to appear.
Right-click the tab of that new page and select Make Subpage, or drag the subpage tab to the right.
Adding and organizing notes
Adding notes to a page in OneNote is as simple as clicking where you’d like the note to appear and adding your content. Most often, that content tends to be typed notes, but it can also be ink, images, web content, and more.
To add typed text, click where you want the text to appear and begin entering text. Don’t be too concerned if you decide to change the layout later. You can move your notes around on the page whenever you want.
To format your text, select the text you want to format and use the formatting tools on the Home tab of the ribbon or on the Mini Toolbar that appears just above the selected text. You can apply various font colors, font sizes or types, effects like Bold or Underline, and also highlights to your text.
OneNote makes a basic set of Styles that you can use to format your notes. To apply a style, select the text you want to apply the style to, and then select the style you want to apply from the Styles gallery on the ribbon.
Inserting images
There are a number of ways you can insert images into your notes in OneNote 2013. First, select the note page where you want the image to appear. Then use one of the following techniques to insert your image:
On the Insert tab, click Pictures to select an image from your hard drive or Online Pictures to search online sources for an image or piece of clip art to insert.
On the Insert tab, click Screen Clipping to use the Screen Clipping tool to select and insert a portion of your screen. This is great for inserting images of error messages or other on-screen content.
If you have a scanner connected to your computer or device, you can click Scanned Image on the Insert tab to insert an image from your scanner.
In some cases, you can drag images from other applications right into your notes.
You can press the Windows logo key+N to open the Send to OneNote tool, then press N again to start a screen clipping action. Select a section of the screen you want to clip, and then paste it into your notes.
After you’ve inserted an image into OneNote, you can move it to wherever you would like it to appear on the page. Just drag the image to place it. You can also resize the image by dragging one of the image’s handles that appear at the sides and corners of the image when you select it.
This chapter is from the book
Related resources
- By Cindy Lewis, Carl Chatfield, Timothy Johnson
- Book $39.99
- By Paul McFedries
- Book $39.99
- By Cindy Lewis, Carl Chatfield, Timothy Johnson
- eBook (Watermarked) $31.99
Applies to: Consumer notebooks on OneDrive | Enterprise notebooks on Microsoft 365
Microsoft Onenote Section Bold Font
To get OneNote content and structure, you send a GET request to the target endpoint. For example:
GET ../onenote/pages/{id}
If the request is successful, Microsoft Graph returns a 200 HTTP status code and the entities or content that you requested. OneNote entities are returned as JSON objects that conform to the OData version 4.0 specification.
By using query string options, you can filter your queries and improve performance.
Construct the request URI
To construct the request URI, start with the service root URL:
https://graph.microsoft.com/v1.0/me/onenote
Then append the endpoint of the resource you want to retrieve. (Resource paths are shown in the next section.)
Your full request URI will look like one of these examples:
https://graph.microsoft.com/v1.0/me/onenote/notebooks/{id}/sections
https://graph.microsoft.com/v1.0/me/onenote/notes/pages
https://graph.microsoft.com/v1.0/me/onenote/pages?select=title,self
Note: Learn more about the service root URL.
Resource paths for GET requests
Use the following resource paths to get pages, sections, section groups, notebooks, and image or file resources.
Page collection
Get pages (metadata) across all notebooks.
../pages[?filter,orderby,select,expand,top,skip,search,count]
Get pages (metadata) from a specific section.
../sections/{section-id}/pages[?filter,orderby,select,expand,top,skip,search,count,pagelevel]
The `search` query string option is available for consumer notebooks only.
The default sort order for pages is lastModifiedTime desc
.
The default query expands the parent section and selects the section's id
, name
, and self
properties.
By default, only the top 20 entries are returned for GET pages requests. Requests that don't specify a top query string option return an @odata.nextLink
link in the response that you can use to get the next 20 entries.
For the pages collection in a section, use pagelevel to return the indentation level of pages and their order within the section.
Example
GET ../sections/{section-id}/pages?pagelevel=true
Page entity
Get the metadata for a specific page.
../pages/{page-id}[?select,expand,pagelevel]
Pages can expand the parentNotebook and parentSection properties.
The default query expands the parent section and selects the section's id
, name
, and self
properties.
Use pagelevel to return the indentation level of the page and its order within its parent section.
Example
GET ../pages/{page-id}?pagelevel=true
Page preview
Get text and image preview content for a page.
../pages/{page-id}/preview
The JSON response contains the preview content, which you can use to help users identify what's in the page.
The previewText property contains a text snippet from the page. Microsoft Graph returns complete phrases, up to a maximum of 300 characters.
If the page has an image that can be used to build a preview UI, the href property in the previewImageUrl object contains a link to a public image resource. You can use this link in HTML. Otherwise, href returns null.
Example
<img src='https://www.onenote.com/api/v1.0/resources/{id}/content?publicAuth=true&mimeType=image/png' />
Page HTML content
Get the HTML content of a page.
../pages/{page-id}/content[?includeIDs]
(learn more about returned HTML content)
Use the includeIDs=true query string option to get generated IDs used to update the page.
Section collection
Get all sections from all notebooks that are owned by the user, including sections in nested section groups.
../sections[?filter,orderby,select,top,skip,expand,count]
Get all sections that are directly under a specific section group.
../sectionGroups/{sectiongroup-id}/sections[?filter,orderby,select,top,skip,expand,count]
Get all sections that are directly under a specific notebook.
../notebooks/{notebook-id}/sections[?filter,orderby,select,top,skip,expand,count]
Sections can expand the parentNotebook and parentSectionGroup properties.
The default sort order for sections is name asc
.
The default query expands the parent notebook and parent section group and selects their id
, name
, and self
properties.
Section entity
Get a specific section.
../sections/{section-id}[?select,expand]
Sections can expand the parentNotebook and parentSectionGroup properties.
The default query expands the parent notebook and parent section group and selects their id
, name
, and self
properties.
SectionGroup collection
Get all section groups from all notebooks that are owned by the user, including nested section groups.
../sectionGroups[?filter,orderby,select,top,skip,expand,count]
Get all section groups that are directly under a specific notebook.
../notebooks/{notebook-id}/sectionGroups[?filter,orderby,select,top,skip,expand,count]
Section groups can expand the sections, sectionGroups, parentNotebook, and parentSectionGroup properties.
The default sort order for section groups is name asc
.
The default query expands the parent notebook and parent section group and selects their id
, name
, and self
properties.
SectionGroup entity
Get a specific section group.
../sectionGroups/{sectiongroup-id}[?select,expand]
Section groups can expand the sections, sectionGroups, parentNotebook, and parentSectionGroup properties.
The default query expands the parent notebook and parent section group and selects their id
, name
, and self
properties.
Notebook collection
Get all the notebooks that are owned by the user.
../notebooks[?filter,orderby,select,top,skip,expand,count]
Notebooks can expand the sections and sectionGroups properties.
The default sort order for notebooks is name asc
.
Notebook entity
Get a specific notebook.
../notebooks/{notebook-id}[?select,expand]
Notebooks can expand the sections and sectionGroups properties.
Image or other file resource
Get the binary data of a specific resource.
../resources/{resource-id}/$value
You can find the file's resource URI in the page's output HTML.
For example, an img tag includes endpoints for the original image in the data-fullres-src attribute and the optimized image in the src attribute.
Example
And an object tag includes the endpoint for the file resource in the data attribute.
Example
Note:Getting a collection of resources is not supported.
When you get a file resource, you don't need to include an Accept content type in the request.
For more information about GET requests, see the following resources in the Microsoft Graph API REST reference:
Example GET requests
You can query for OneNote entities and search page content to get just the information you need. The following examples show some ways you can use supported query string options in GET requests to Microsoft Graph.
Remember:
All GET requests start with the service root URL.
Examples:https://www.onenote.com/api/v1.0/me/notes
andhttps://www.onenote.com/api/v1.0/myOrganization/siteCollections/{id}/sites/{id}/notes/
Spaces in the URL query string must use %20 encoding.
Example:filter=title%20eq%20'biology'
Property names and OData string comparisons are case-sensitive. We recommend using the OData tolower function for string comparisons.
Example:filter=tolower(name) eq 'spring'
search & filter
Get all pages that contain the term recipe that were created by a specific app (search
is available for consumer notebooks only).
search & select
Get the title, OneNote client links, and contentUrl link for all pages that contain the term golgi app (search
is available for consumer notebooks only).
expand
Get all notebooks and expand their sections and section groups.
Get a specific section group and expand its sections and section groups.
Get a page and expand its parent section and parent notebook.
expand (multiple levels)
Get all notebooks and expand their sections and section groups, and expand all sections in each section group.
Note:Expanding parents of child entities or expanding children of parent entities creates a circular reference and is not supported.
expand & select (multiple levels)
Get the name and self link for a specific section group, and get the name and self links for all its sections.
Get the name and self link for all sections, and get the name and created time of each section's parent notebook.
Get the title and ID for all pages, and get the name of the parent section and parent notebook.
expand & levels (multiple levels)
Get all notebooks, sections, and section groups.
filter
Get all sections that were created in October 2014.
Get the pages that were created by a specific app since January 1, 2015.
filter & expand
Get all pages in a specific notebook. The API returns 20 entries by default.
Get the name and pagesUrl link for all sections from the School notebook. OData string comparisons are case-sensitive, so use the tolower function as a best practice.
filter & select & orderby
Get the name and pagesUrl link for all sections that contain the term spring in the section name. Order sections by last modified date.
orderby
Get the first 20 pages ordered by createdByAppId property and then by most recent created time. The API returns 20 entries by default.
search & filter & top
Get the five newest pages created since January 1, 2015 that contain the phrase cell division. The API returns 20 entries by default with a maximum of 100. The default sort order for pages is lastModifiedTime desc
(search
is available for consumer notebooks only).
search & filter & top & skip
Get the next five pages in the result set (search
is available for consumer notebooks only).
And the next five (search
is available for consumer notebooks only).
Note:If both search and filter are applied to the same request, the results include only those entities that match both criteria.
select
Get the name, created time, and self link for all sections in the user's notebooks.
Get the title, created time, and OneNote client links for a specific page.
select & expand & filter (multiple levels)
Get the name and pagesUrl link for all sections in the user's default notebook.
top & select & orderby
Get the title and self link for the first 50 pages, ordered alphabetically by title. The API returns 20 entries by default with a maximum of 100. The default sort order for pages is lastModifiedTime desc
.
skip & top & select & orderby
Get pages 51 to 100. The API returns 20 entries by default with a maximum of 100.
Note:GET requests for pages that retrieve the default number of entries (that is, they don't specify a top expression) return an @odata.nextLink link in the response that you can use to get the next 20 entries.
Supported OData query string options
When sending GET requests to Microsoft Graph, you can use OData query string options to customize your query and get just the information you need. They can also improve performance by reducing the number of calls to the service and the size of the response payload.
Note:For readability, the examples in this article don't use the %20 percent-encoding required for spaces in the URL query string: filter=isDefault%20eq%20true
Query option | Example and description |
---|---|
count |
The count of entities in the collection. The value is returned in the @odata.count property in the response. |
expand |
The navigation properties to return inline in the response. The following properties are supported for expand expressions: By default, GET requests for pages expands parentSection and select the section's id, name, and self properties. Default GET requests for sections and section groups expand both parentNotebook and parentSectionGroup, and select the parents' id, name, and self properties. Can be used for a single entity or a collection. |
filter |
A Boolean expression for whether to include an entry in the result set. Supports the following OData operators and functions: Property names and OData string comparisons are case-sensitive. We recommend using the OData tolower function for string comparisons. |
orderby |
The properties to sort by, with an optional asc (default) or desc sort order. You can sort by any property of the entity in the requested collection. The default sort order for notebooks, section groups, and sections is Separate multiple properties with commas, and list them in the order that you want them applied. Property names are case-sensitive. |
search |
Available for consumer notebooks only. The term or phrase to search for in the page title, page body, image alt text, and image OCR text. By default, search queries return results sorted by relevance. OneNote uses Bing full-text search to support phrase search, stemming, spelling forgiveness, relevance and ranking, word breaking, multiple languages, and other full-text search features. Search strings are case-insensitive. Applies only to pages in notebooks owned by the user. Indexed content is private and can only be accessed by the owner. Password-protected pages are not indexed. Applies only to the |
select |
The properties to return. Can be used for a single entity or for a collection. Separate multiple properties with commas. Property names are case-sensitive. |
skip |
The number of entries to skip in the result set. Typically used for paging results. |
top |
The number of entries to return in the result set, up to a maximum of 100. The default value is 20. |
Microsoft Graph also provides the pagelevel
query string option you can use to get the level and order of pages within the parent section. Applies only to queries for pages in a specific section or queries for a specific page.
Examples
GET ../sections/{section-id}/pages?pagelevel=true
GET ../pages/{page-id}?pagelevel=true
Supported OData operators and functions
Microsoft Graph supports the following OData operators and functions in filter expressions. When using OData expressions, remember:
Spaces in the URL query string must be replaced with the
%20
encoding.
Example:filter=isDefault%20eq%20true
Property names and OData string comparisons are case-sensitive. We recommend using the OData tolower function for string comparisons.
Example:filter=tolower(name) eq 'spring'
Comparison operator | Example |
---|---|
eq (equal to) | createdByAppId eq '{app-id}' |
ne (not equal to) | userRole ne 'Owner' |
gt (greater than) | createdTime gt 2014-02-23 |
ge (greater than or equal to) | lastModifiedTime ge 2014-05-05T07:00:00Z |
lt (less than) | createdTime lt 2014-02-23 |
le (less than or equal to) | lastModifiedTime le 2014-02-23 |
Logical operator | Example |
---|---|
and | createdTime le 2014-01-30 and createdTime gt 2014-01-23 |
or | createdByAppId eq '{app-id}' or createdByAppId eq '{app-id}' |
not | not contains(tolower(title),'school') |
| String function | Example | |------|------| | contains | `contains(tolower(title),'spring')` | | endswith | `endswith(tolower(title),'spring')` | | startswith | `startswith(tolower(title),'spring')` | | length | `length(title) eq 19` | | indexof | `indexof(tolower(title),'spring') eq 1` | | substring | `substring(tolower(title),1) eq 'spring'` | | tolower | `tolower(title) eq 'spring'` | | toupper | `toupper(title) eq 'SPRING'` | | trim | `trim(tolower(title)) eq 'spring'` | | concat | `concat(title,'- by MyRecipesApp') eq 'Carrot Cake Recipe - by MyRecipesApp'` |
Microsoft Onenote Section Bold Style
OneNote entity properties
The filter, select, expand, and orderby query expressions can include properties of OneNote entities.
Example
../sections?filter=createdTime ge 2015-01-01&select=name,pagesUrl&orderby=lastModifiedTime desc
Property names are case-sensitive in query expressions.
For the list of properties and property types, see the following resources in the Microsoft Graph API REST reference:
The expand query string option can be used with the following navigation properties:
- Pages: parentNotebook, parentSection
- Sections: parentNotebook, parentSectionGroup
- Section groups: sections, sectionGroups, parentNotebook, parentSectionGroup
- Notebooks: sections, sectionGroups
Request and response information for GET requests
Request data | Description |
---|---|
Protocol | All requests use the SSL/TLS HTTPS protocol. |
Authorization header |
If missing or invalid, the request fails with a 401 status code. See Authentication and permissions. |
Accept header |
|
Response data | Description |
---|---|
Success code | A 200 HTTP status code. |
Response body | An OData representation of the entity or entity set in JSON format, the page HTML, or file resource binary data. |
Errors | If the request fails, the API returns errors in the @api.diagnostics object in the response body. |
X-CorrelationId header | A GUID that uniquely identifies the request. You can use this value along with the value of the Date header when working with Microsoft support to troubleshoot issues. |
Constructing the Microsoft Graph notes service root URL
The Microsoft Graph notes root URL uses the following format for all calls to Microsoft Graph notes:
https://graph.microsoft.com/{version}/me/onenote/
The version
segment in the URL represents the version of Microsoft Graph that you want to use. Use v1.0
for stable production code. Use beta
to try out a feature that's in development. Features and functionality in beta may change, so you shouldn't use it in your production code.
Use me
for OneNote content that the current user can access (owned and shared). Use users/{id}
for OneNote content that the specified user (in the URL) has shared with the current user. Use Microsoft Graph to get user IDs.
Permissions for GET requests
To get OneNote content or structure, you'll need to request appropriate permissions.
The following scopes allow GET requests to Microsoft Graph. Choose the lowest level of permissions that your app needs to do its work.
Choose from:
- Notes.read
- Notes.ReadWrite
- Notes.ReadWrite.All
For more information about permission scopes and how they work, see Microsoft Graph permissions reference.