Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macros

Macro Debugging

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Storing persistent data

Using binary data

Sorting objects

Macro menus

Bulleted and numbered lists

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Last updated on: September 02, 2024
Also available as a single HTML file

Onetastic Macro Documentation > Hierarchy Objects > Section

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

Hierarchy Objects

Page Objects

Other Objects

Functions

Array Functions

Color Functions

Data Store Functions

Date/Time Functions

Dialog Box Functions

Macro Execution Functions

Macro Menu Functions

Object Functions

Special Functions

String Functions

Window Functions