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

Text Object

Description

Represents a range of text in a OneNote page.

Hierarchical Structure

Text objects can be found under following objects: Paragraph

Creating Text Objects

Text objects can be inserted directly under following objects: Paragraph

Properties

Name Type Access Description
bold Bool read-write Whether this Text is bold or not.
endIndex Numeric read-only The number of characters before the end of this Text in the paragraph.
fontColor Color read-write Color of this Text.
fontName String read-write Name of the font face for this Text.
fontSize Numeric read-write Size of the font for this Text.
highlightColor Color read-write Highlight color of this Text.
hyperlink String read-write The hyperlink of this Text (user would navigate to this hyperlink when clicking on this Text).
italic Bool read-write Whether this Text is italicized or not.
lang String read-write The language in which this Text is written in.
selected Bool read-write Whether this Text is selected or not.
startIndex Numeric read-only The number of characters before this Text in the containing paragraph. The first Text will start with index 0 and each character will be counted as 1.
strikethrough Bool read-write Whether this Text is striked through or not.
supersub SuperSub read-write Whether this Text is subscript/superscript or not.
type ObjectType read-only Type of this object. Always has the value of "Text".
underline Bool read-write Whether this Text is underlined or not.
value String read-write The text itself.

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