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

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

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