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 > Page

Page Object

Description

Represents a page in OneNote. The current Page can be obtained by calling GetCurrentPage function.

Hierarchical Structure

Page objects can be found under following objects: Section

Page objects can contain following objects: Image Title Outline EmbeddedFile

Creating Page Objects

Page objects can be inserted directly under following objects: Section

Properties

Name Type Access Description
automaticSize Bool read-write Whether this Page has a fixed printed paper width and height or not.
color Color read-write The background color for this Page.
dateTime DateTime read-write The date and time this Page is originally created.
hasTitle bool read-only Whether this Page has a title or not.
height Numeric read-write The printed paper height of this Page.
hyperlink String read-only A hyperlink that points to this Page.
id String read-only The unique identifier of this Page.
images Array<Image> read-only The list of images directly under in this Page. This array doesn't contain images in outlines.
isCollapsed Bool read-write Whether the subpages of this Page is collapsed or not.
isCurrentlyViewed Bool read-only Whether this Page is currently being viewed by the user in OneNote or not.
isInRecycleBin Bool read-only Whether this Page is in the notebook recycle bin or not. Filter by this property if you want to exclude Pages in recycle bin.
isIndexed Bool read-only Whether this Page is indexed or not.
isUnread Bool read-write Whether this Page is unread or not.
lastModifiedTime DateTime read-write The date and time of the last modification to this Page.
marginBottom Numeric read-write The printed paper bottom margin for this Page.
marginLeft Numeric read-write The printed paper left margin for this Page.
marginRight Numeric read-write The printed paper right margin for this Page.
marginTop Numeric read-write The printed paper top margin for this Page.
name String read-only The name of this Page.
orientation Orientation read-write Whether this Page is portrait or landscape oriented.
outlines Array<Outline> read-only The list of outlines in this Page.
pageLevel Numeric read-write The subpage level of this Page. Subpages will have a level of 2 or 3 where main pages will have a level of 1.
pageObjects Array<PageObject> read-only The list of page object directly under this Page.
rtl Bool read-write Whether this Page is right-to-left aligned or not.
ruleLinesHorizontalColor Color read-write The color for the horizontal rule lines for this Page.
ruleLinesHorizontalSpacing Numeric read-write The amount of space between the horizontal rule lines for this Page in points.
ruleLinesMarginColor Color read-write The color for the vertical margin rule line for this Page.
ruleLinesVerticalColor Color read-write The color for the vertical rule lines for this Page.
ruleLinesVerticalSpacing Numeric read-write The amount of space between the vertical rule lines for this Page in points.
ruleLinesVisible Bool read-write Whether the rule lines for this Page is visible or not.
selection Selection read-write Whether this Page is fully or partially selected or not.
stationeryName String read-only The name of the page template used to create this Page.
title Title read-only The title area of the page that contains the title bar, date and time. Accessing this object will create the page title if it doesn't already exist. Use hasTitle property to check whether a title already exists or not.
type ObjectType read-only Type of this object. Always has the value of "Page".
width Numeric read-write The printed paper width of this Page.

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