Tutorial

Getting Started with Macros

Macro Editor

User Interface

Editing Macro Statements

Expression Editor

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Sorting objects

Macro Logging

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Section Object

Description

Represents a section in OneNote. The current Section can be obtained by calling GetCurrentSection function.

Hierarchical Structure

Section objects can be found under following objects: Notebook SectionGroup

Section objects can contain following objects: Page

Creating Section Objects

Section objects can be inserted directly under following objects: Notebook SectionGroup

Properties

Name Type Access Description
areAllPagesAvailable Bool read-only Whether all pages in this Section is available or not. Pages may not be available if they weren't fully uploaded by the client that created it.
color Color read-write The color of this Section.
encrypted Bool read-only Whether this Section is encrypted (password protected) or not.
hyperlink String read-only A hyperlink that points to this Section.
id String read-only The unique identifier of this Section.
isCurrentlyViewed Bool read-only Whether this Section is currently being viewed by the user in OneNote or not.
isDeletedPages Bool read-only Whether this Section is the recycle bin section that contains the deleted pages for the notebook.
isInRecycleBin Bool read-only Whether this Section is in the notebook recycle bin or not. Filter by this property if you want to exclude Sections in recycle bin.
isUnread Bool read-write Whether this Section is unread or not.
lastModifiedTime DateTime read-write The date and time of the last modification to this Section.
locked Bool read-only Whether this Section is encrypted (password protected) and locked or not. Pages in locked Sections cannot be accessed until unlocked by the user.
name String read-write The name of this Section.
pageCount Numeric read-only The number of pages in this Section.
pages Array<Page> read-only The list of pages in this Section.
path String read-only The physical file path of this Section.
readOnly Bool read-only Whether this Section is read-only or not.
type ObjectType read-only Type of this object. Always has the value of "Section".

Reference

Statements

ForEach

If

Else

While

Expression

Comment

Break

Continue

Hierarchy Objects

NotebookRoot

Notebook

SectionGroup

Section

Page

Page Objects

Title

Outline

Table

Column

Row

Cell

Paragraph

Text

Image

EmbeddedFile

Tag

Other Objects

DialogBox

Functions

Array Functions

Date/Time Functions

Dialog Box Functions

Macro Execution Functions

Object Functions

String Functions