Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macro Statements

Expression Editor

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: March 19, 2023
Also available as a single HTML file

Onetastic Macro Documentation > Hierarchy Objects > Notebook

Notebook Object

Description

Represents a notebook in OneNote. The current Notebook can be obtained by calling GetCurrentNotebook function.

Hierarchical Structure

Notebook objects can contain following objects: SectionGroup Section

Creating Notebook Objects

Notebook objects cannot be inserted with Onetastic Macros

Properties

Name Type Access Description
color Color read-write The color of this Notebook.
hyperlink String read-only A hyperlink that points to this Notebook.
id String read-only The unique identifier of this Notebook.
isCurrentlyViewed Bool read-only Whether this Notebook is currently being viewed by the user in OneNote or not.
isInRecycleBin Bool read-only Whether this Notebook is in the notebook recycle bin or not. Filter by this property if you want to exclude Notebooks in recycle bin.
isUnread Bool read-write Whether this Notebook is unread or not.
lastModifiedTime DateTime read-write The date and time of the last modification to this Notebook.
name String read-write The name of this Notebook.
nickname String read-write The name of this Notebook as displayed in the OneNote client.
path String read-only The physical file path of this Notebook.
sectionCount Numeric read-only The number of sections in this Notebook.
sectionGroupCount Numeric read-only The number of section groups in this Notebook.
sectionGroups Array<SectionGroup> read-only The list of section groups directly in this Notebook.
sections Array<Section> read-only The list of sections directly in this Notebook.
type ObjectType read-only Type of this object. Always has the value of "Notebook".

Reference

Statements

For

ForEach

If

Else If

Else

Switch

Case

Default

While

Expression

Comment

Break

Continue

Return

Hierarchy Objects

NotebookRoot

Notebook

SectionGroup

Section

Page

Page Objects

Title

Outline

Table

Column

Row

Cell

Paragraph

Text

Image

EmbeddedFile

Tag

Other Objects

DialogBox

MacroMenu

Window

Functions

Array Functions

Color Functions

Data Store Functions

Date/Time Functions

Dialog Box Functions

Macro Execution Functions

Macro Menu Functions

Object Functions

String Functions

Window Functions