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 > Other Objects > Window

Window Object

Description

Represents a OneNote window.

Remarks

OneNote can display notebooks in one or more Windows. The collection of these windows can be accessed through GetWindows function. At most one of the windows is the current window. This can be checked by isCurrent property and the current window can be accessed through Window_GetCurrent. A window can be made current via Window_SetCurrent function. New windows can be created by Window_Create and windows can be closed by Window_Close. The page a window is displaying can be changed by Window_NavigateTo.

Properties

Name Type Access Description
isCurrent Bool read-only Whether this window is the current window or not.
notebook Notebook read-only The notebook this window is currently displaying. This property may be empty if the window is not currently displaying a notebook.
page Page read-only The page this window is currently displaying. This property may be empty if the window is not currently displaying a page.
section Section read-only The section this window is currently displaying. This property may be empty if the window is not currently displaying a section.
sectionGroup SectionGroup read-only The section group this window is currently displaying. This property may be empty if the window is not currently displaying a section group.
type ObjectType read-only Type of this object. Always has the value of "Window".

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