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

Paragraph Object

Description

Represents a paragraph of text in a OneNote page.

Hierarchical Structure

Paragraph objects can be found under following objects: Outline Cell Title

Paragraph objects can contain following objects: Text Image Table EmbeddedFile

Creating Paragraph Objects

Paragraph objects can be inserted directly under following objects: Outline Cell

Properties

Name Type Access Description
alignment Alignment read-write Text alignment for this Paragraph (e.g. left, right or center).
author String read-write The original author of this Paragraph.
authorInitials String read-write The initials of the original author of this Paragraph.
bold Bool write-only Whether the text in this Paragraph is bold or not. This property is write-only as there may be text with different formatting in the paragraph. Setting this property will apply its value to the whole paragraph.
bulletFontColor Color read-write The color for the bullet for this Paragraph.
bulletFontSize Numeric read-write The font size for the bullet for this Paragraph.
collapsed Bool read-write Whether this Paragraph is collapsed or not.
contentType ContentType read-only The type of content stored in this Paragraph.
creationTime DateTime read-write The date and time this Paragraph is originally created.
fontColor Color write-only The text color for this Paragraph. This property is write-only as there may be text with different formatting in the paragraph. Setting this property will apply its value to the whole paragraph.
fontName String write-only The name of the font for this Paragraph. This property is write-only as there may be text with different formatting in the paragraph. Setting this property will apply its value to the whole paragraph.
fontSize Numeric write-only The font size for this Paragraph. This property is write-only as there may be text with different formatting in the paragraph. Setting this property will apply its value to the whole paragraph.
highlightColor Color write-only The highlight color for this Paragraph. This property is write-only as there may be text with different formatting in the paragraph. Setting this property will apply its value to the whole paragraph.
hyperlink String read-only The hyperlink to this Paragraph.
indent Numeric read-write The indent amount for this Paragraph, relative to its parent Outline or Cell. An unindented Paragraph has an indent of 0.
index Numeric read-only The number of Paragraphs before this Paragraph within its Outline or Cell. The paragraph must be in an Outline or a Cell, otherwise this property has the value of 0.
isPartOfBulletedList Bool read-only Whether this Paragraph is part of a bulleted list or not.
isPartOfList Bool read-only Whether this Paragraph is part of a bulleted or numbered list or not.
isPartOfNumberedList Bool read-only Whether this Paragraph is part of a numbered list or not.
italic Bool write-only Whether the text in this Paragraph is italicized or not. This property is write-only as there may be text with different formatting in the paragraph. Setting this property will apply its value to the whole paragraph.
lang String write-only The language the text in this Paragraph is writte in. This property is write-only as there may be text with different languages in the paragraph. Setting this property will apply its value to the whole paragraph.
lastModifiedBy String read-write The person who last modified this Paragraph.
lastModifiedByInitials String read-write The initials of the person who last modified this Paragraph.
lastModifiedTime DateTime read-write The date and time of the last modification to this Paragraph.
listAlignment Alignment read-write The text alignment for the numbered list for this Paragraph (left vs right).
listSpacing Numeric read-write The space between the numbered list and the paragraph in points.
numberBold Bool read-write Whether the numbered list for this Paragraph is bold or not.
numberFont String read-write The name of the font face for the numbered list for this Paragraph.
numberFontColor Color read-write The color for the numbered list for this Paragraph.
numberFontSize Numeric read-write The size of the font for the numbered list for this Paragraph.
numberFormat String read-write The number format for the numbered list for this Paragraph.
numberItalic Bool read-write Whether the numbered list for this Paragraph is italicized or not.
numberLanguage String read-write The language for the numbered list for this Paragraph.
numberSequence Numeric read-write The number sequence for the numbered list for this Paragraph.
numberText String read-write The text for the numbered list for this Paragraph.
objectId String read-write The unique identifier of this Paragraph.
rtl Bool read-write Whether this Paragraph is right-to-left aligned or not.
selection Selection read-write Whether this Paragraph is fully or partially selected or not.
spaceAfter Numeric read-only The amount of space after this Paragraph in points.
spaceBefore Numeric read-only The amount of space before this Paragraph in points.
spaceBetween Numeric read-only The amount of space between the lines of this Paragraph in points.
strikethrough Bool write-only Whether the text in this Paragraph is striked through or not. This property is write-only as there may be text with different formatting in the paragraph. Setting this property will apply its value to the whole paragraph.
style String read-only The style of this Paragraph.
supersub SuperSub write-only Whether the text in this Paragraph is superscript/subscript or not. This property is write-only as there may be text with different formatting in the paragraph. Setting this property will apply its value to the whole paragraph.
tags Array<Tag> read-only List of tags associated with this Paragraph.
text String read-write The text of this Paragraph.
text_numeric Numeric read-write The text of this Paragraph interpreted as a numerical value. Useful to apply arithmetic operations on it.
texts Array<Text> read-only List of Text objects within this Paragraph.
type ObjectType read-only Type of this object. Always has the value of "Paragraph".
underline Bool write-only Whether the text in this Paragraph is underlined or not. This property is write-only as there may be text with different formatting in the paragraph. Setting this property will apply its value to the whole paragraph.

Deprecated Properties

Following properties are deprecated. Do not use these in new macros. See descriptions below on what to use instead.

Name Type Access Description
tagCompleted Bool read-write Whether the first tag associated with this Paragraph is completed (checked) or not. This property is deprecated. Use tags property instead.
tagCompletionDate DateTime read-write The date and time of completion of the first tag associated with this Paragraph. This property is deprecated. Use tags property instead.
tagCreationDate DateTime read-write The date and time of creation of the first tag associated with this Paragraph. This property is deprecated. Use tags property instead.
tagDisabled Bool read-write Whether the first tag associated with this Paragraph is disabled (dimmed) or not. This property is deprecated. Use tags property instead.
tagFontColor Color read-only The font color for the first tag associated with this Paragraph for tags that use formatting instead of a symbol. This property is deprecated. Use tags property instead.
tagHighlightColor Color read-only The highlight color for the first tag associated with this Paragraph for tags that use formatting instead of a symbol. This property is deprecated. Use tags property instead.
tagName String read-only The name of the first tag associated with this Paragraph. This property is deprecated. Use tags property instead.
tagSymbol Numeric read-only The symbol of the first tag associated with this Paragraph. This property is deprecated. Use tags property instead.
tagType Numeric read-only The type of the first tag associated with this Paragraph. This property is deprecated. Use tags property instead.

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