onenote package

Classes

OneNote.Application

Represents the top-level object that contains all globally addressable OneNote objects such as notebooks, the active notebook, and the active section.

OneNote.FloatingInk

Represents a group of ink strokes.

OneNote.Image

Represents an Image. An Image can be a direct child of a PageContent object or a Paragraph object.

OneNote.InkAnalysis

Represents ink analysis data for a given set of ink strokes.

OneNote.InkAnalysisLine

Represents ink analysis data for an identified text line formed by ink strokes.

OneNote.InkAnalysisLineCollection

Represents a collection of InkAnalysisLine objects.

OneNote.InkAnalysisParagraph

Represents ink analysis data for an identified paragraph formed by ink strokes.

OneNote.InkAnalysisParagraphCollection

Represents a collection of InkAnalysisParagraph objects.

OneNote.InkAnalysisWord

Represents ink analysis data for an identified word formed by ink strokes.

OneNote.InkAnalysisWordCollection

Represents a collection of InkAnalysisWord objects.

OneNote.InkStroke

Represents a single stroke of ink.

OneNote.InkStrokeCollection

Represents a collection of InkStroke objects.

OneNote.InkWord

A container for the ink in a word in a paragraph.

OneNote.InkWordCollection

Represents a collection of InkWord objects.

OneNote.Notebook

Represents a OneNote notebook. Notebooks contain section groups and sections.

OneNote.NotebookCollection

Represents a collection of notebooks.

OneNote.NoteTag

A container for the NoteTag in a paragraph.

OneNote.Outline

Represents a container for Paragraph objects.

OneNote.Page

Represents a OneNote page.

OneNote.PageCollection

Represents a collection of pages.

OneNote.PageContent

Represents a region on a page that contains top-level content types such as Outline or Image. A PageContent object can be assigned an XY position.

OneNote.PageContentCollection

Represents the contents of a page, as a collection of PageContent objects.

OneNote.Paragraph

A container for the visible content on a page. A Paragraph can contain any one ParagraphType type of content.

OneNote.ParagraphCollection

Represents a collection of Paragraph objects.

OneNote.Point

Represents a single point of ink stroke

OneNote.PointCollection

Represents a collection of Point objects.

OneNote.RequestContext
OneNote.RichText

Represents a RichText object in a Paragraph.

OneNote.Section

Represents a OneNote section. Sections can contain pages.

OneNote.SectionCollection

Represents a collection of sections.

OneNote.SectionGroup

Represents a OneNote section group. Section groups can contain sections and other section groups.

OneNote.SectionGroupCollection

Represents a collection of section groups.

OneNote.Table

Represents a table in a OneNote page.

OneNote.TableCell

Represents a cell in a OneNote table.

OneNote.TableCellCollection

Contains a collection of TableCell objects.

OneNote.TableRow

Represents a row in a table.

OneNote.TableRowCollection

Contains a collection of TableRow objects.

Interfaces

OneNote.ImageOcrData

Represents data obtained by OCR (optical character recognition) of an image.

OneNote.InkStrokePointer

Weak reference to an ink stroke object and its content parent.

OneNote.Interfaces.ApplicationData

An interface describing the data returned by calling application.toJSON().

OneNote.Interfaces.ApplicationLoadOptions

Represents the top-level object that contains all globally addressable OneNote objects such as notebooks, the active notebook, and the active section.

OneNote.Interfaces.ApplicationUpdateData

An interface for updating data on the Application object, for use in application.set({ ... }).

OneNote.Interfaces.CollectionLoadOptions

Provides ways to load properties of only a subset of members of a collection.

OneNote.Interfaces.FloatingInkData

An interface describing the data returned by calling floatingInk.toJSON().

OneNote.Interfaces.FloatingInkLoadOptions

Represents a group of ink strokes.

OneNote.Interfaces.ImageData

An interface describing the data returned by calling image.toJSON().

OneNote.Interfaces.ImageLoadOptions

Represents an Image. An Image can be a direct child of a PageContent object or a Paragraph object.

OneNote.Interfaces.ImageUpdateData

An interface for updating data on the Image object, for use in image.set({ ... }).

OneNote.Interfaces.InkAnalysisData

An interface describing the data returned by calling inkAnalysis.toJSON().

OneNote.Interfaces.InkAnalysisLineCollectionData

An interface describing the data returned by calling inkAnalysisLineCollection.toJSON().

OneNote.Interfaces.InkAnalysisLineCollectionLoadOptions

Represents a collection of InkAnalysisLine objects.

OneNote.Interfaces.InkAnalysisLineCollectionUpdateData

An interface for updating data on the InkAnalysisLineCollection object, for use in inkAnalysisLineCollection.set({ ... }).

OneNote.Interfaces.InkAnalysisLineData

An interface describing the data returned by calling inkAnalysisLine.toJSON().

OneNote.Interfaces.InkAnalysisLineLoadOptions

Represents ink analysis data for an identified text line formed by ink strokes.

OneNote.Interfaces.InkAnalysisLineUpdateData

An interface for updating data on the InkAnalysisLine object, for use in inkAnalysisLine.set({ ... }).

OneNote.Interfaces.InkAnalysisLoadOptions

Represents ink analysis data for a given set of ink strokes.

OneNote.Interfaces.InkAnalysisParagraphCollectionData

An interface describing the data returned by calling inkAnalysisParagraphCollection.toJSON().

OneNote.Interfaces.InkAnalysisParagraphCollectionLoadOptions

Represents a collection of InkAnalysisParagraph objects.

OneNote.Interfaces.InkAnalysisParagraphCollectionUpdateData

An interface for updating data on the InkAnalysisParagraphCollection object, for use in inkAnalysisParagraphCollection.set({ ... }).

OneNote.Interfaces.InkAnalysisParagraphData

An interface describing the data returned by calling inkAnalysisParagraph.toJSON().

OneNote.Interfaces.InkAnalysisParagraphLoadOptions

Represents ink analysis data for an identified paragraph formed by ink strokes.

OneNote.Interfaces.InkAnalysisParagraphUpdateData

An interface for updating data on the InkAnalysisParagraph object, for use in inkAnalysisParagraph.set({ ... }).

OneNote.Interfaces.InkAnalysisUpdateData

An interface for updating data on the InkAnalysis object, for use in inkAnalysis.set({ ... }).

OneNote.Interfaces.InkAnalysisWordCollectionData

An interface describing the data returned by calling inkAnalysisWordCollection.toJSON().

OneNote.Interfaces.InkAnalysisWordCollectionLoadOptions

Represents a collection of InkAnalysisWord objects.

OneNote.Interfaces.InkAnalysisWordCollectionUpdateData

An interface for updating data on the InkAnalysisWordCollection object, for use in inkAnalysisWordCollection.set({ ... }).

OneNote.Interfaces.InkAnalysisWordData

An interface describing the data returned by calling inkAnalysisWord.toJSON().

OneNote.Interfaces.InkAnalysisWordLoadOptions

Represents ink analysis data for an identified word formed by ink strokes.

OneNote.Interfaces.InkAnalysisWordUpdateData

An interface for updating data on the InkAnalysisWord object, for use in inkAnalysisWord.set({ ... }).

OneNote.Interfaces.InkStrokeCollectionData

An interface describing the data returned by calling inkStrokeCollection.toJSON().

OneNote.Interfaces.InkStrokeCollectionLoadOptions

Represents a collection of InkStroke objects.

OneNote.Interfaces.InkStrokeCollectionUpdateData

An interface for updating data on the InkStrokeCollection object, for use in inkStrokeCollection.set({ ... }).

OneNote.Interfaces.InkStrokeData

An interface describing the data returned by calling inkStroke.toJSON().

OneNote.Interfaces.InkStrokeLoadOptions

Represents a single stroke of ink.

OneNote.Interfaces.InkWordCollectionData

An interface describing the data returned by calling inkWordCollection.toJSON().

OneNote.Interfaces.InkWordCollectionLoadOptions

Represents a collection of InkWord objects.

OneNote.Interfaces.InkWordCollectionUpdateData

An interface for updating data on the InkWordCollection object, for use in inkWordCollection.set({ ... }).

OneNote.Interfaces.InkWordData

An interface describing the data returned by calling inkWord.toJSON().

OneNote.Interfaces.InkWordLoadOptions

A container for the ink in a word in a paragraph.

OneNote.Interfaces.NotebookCollectionData

An interface describing the data returned by calling notebookCollection.toJSON().

OneNote.Interfaces.NotebookCollectionLoadOptions

Represents a collection of notebooks.

OneNote.Interfaces.NotebookCollectionUpdateData

An interface for updating data on the NotebookCollection object, for use in notebookCollection.set({ ... }).

OneNote.Interfaces.NotebookData

An interface describing the data returned by calling notebook.toJSON().

OneNote.Interfaces.NotebookLoadOptions

Represents a OneNote notebook. Notebooks contain section groups and sections.

OneNote.Interfaces.NoteTagData

An interface describing the data returned by calling noteTag.toJSON().

OneNote.Interfaces.NoteTagLoadOptions

A container for the NoteTag in a paragraph.

OneNote.Interfaces.OutlineData

An interface describing the data returned by calling outline.toJSON().

OneNote.Interfaces.OutlineLoadOptions

Represents a container for Paragraph objects.

OneNote.Interfaces.PageCollectionData

An interface describing the data returned by calling pageCollection.toJSON().

OneNote.Interfaces.PageCollectionLoadOptions

Represents a collection of pages.

OneNote.Interfaces.PageCollectionUpdateData

An interface for updating data on the PageCollection object, for use in pageCollection.set({ ... }).

OneNote.Interfaces.PageContentCollectionData

An interface describing the data returned by calling pageContentCollection.toJSON().

OneNote.Interfaces.PageContentCollectionLoadOptions

Represents the contents of a page, as a collection of PageContent objects.

OneNote.Interfaces.PageContentCollectionUpdateData

An interface for updating data on the PageContentCollection object, for use in pageContentCollection.set({ ... }).

OneNote.Interfaces.PageContentData

An interface describing the data returned by calling pageContent.toJSON().

OneNote.Interfaces.PageContentLoadOptions

Represents a region on a page that contains top-level content types such as Outline or Image. A PageContent object can be assigned an XY position.

OneNote.Interfaces.PageContentUpdateData

An interface for updating data on the PageContent object, for use in pageContent.set({ ... }).

OneNote.Interfaces.PageData

An interface describing the data returned by calling page.toJSON().

OneNote.Interfaces.PageLoadOptions

Represents a OneNote page.

OneNote.Interfaces.PageUpdateData

An interface for updating data on the Page object, for use in page.set({ ... }).

OneNote.Interfaces.ParagraphCollectionData

An interface describing the data returned by calling paragraphCollection.toJSON().

OneNote.Interfaces.ParagraphCollectionLoadOptions

Represents a collection of Paragraph objects.

OneNote.Interfaces.ParagraphCollectionUpdateData

An interface for updating data on the ParagraphCollection object, for use in paragraphCollection.set({ ... }).

OneNote.Interfaces.ParagraphData

An interface describing the data returned by calling paragraph.toJSON().

OneNote.Interfaces.ParagraphLoadOptions

A container for the visible content on a page. A Paragraph can contain any one ParagraphType type of content.

OneNote.Interfaces.ParagraphUpdateData

An interface for updating data on the Paragraph object, for use in paragraph.set({ ... }).

OneNote.Interfaces.PointCollectionData

An interface describing the data returned by calling pointCollection.toJSON().

OneNote.Interfaces.PointCollectionLoadOptions

Represents a collection of Point objects.

OneNote.Interfaces.PointCollectionUpdateData

An interface for updating data on the PointCollection object, for use in pointCollection.set({ ... }).

OneNote.Interfaces.PointData

An interface describing the data returned by calling point.toJSON().

OneNote.Interfaces.PointLoadOptions

Represents a single point of ink stroke

OneNote.Interfaces.RichTextData

An interface describing the data returned by calling richText.toJSON().

OneNote.Interfaces.RichTextLoadOptions

Represents a RichText object in a Paragraph.

OneNote.Interfaces.SectionCollectionData

An interface describing the data returned by calling sectionCollection.toJSON().

OneNote.Interfaces.SectionCollectionLoadOptions

Represents a collection of sections.

OneNote.Interfaces.SectionCollectionUpdateData

An interface for updating data on the SectionCollection object, for use in sectionCollection.set({ ... }).

OneNote.Interfaces.SectionData

An interface describing the data returned by calling section.toJSON().

OneNote.Interfaces.SectionGroupCollectionData

An interface describing the data returned by calling sectionGroupCollection.toJSON().

OneNote.Interfaces.SectionGroupCollectionLoadOptions

Represents a collection of section groups.

OneNote.Interfaces.SectionGroupCollectionUpdateData

An interface for updating data on the SectionGroupCollection object, for use in sectionGroupCollection.set({ ... }).

OneNote.Interfaces.SectionGroupData

An interface describing the data returned by calling sectionGroup.toJSON().

OneNote.Interfaces.SectionGroupLoadOptions

Represents a OneNote section group. Section groups can contain sections and other section groups.

OneNote.Interfaces.SectionLoadOptions

Represents a OneNote section. Sections can contain pages.

OneNote.Interfaces.TableCellCollectionData

An interface describing the data returned by calling tableCellCollection.toJSON().

OneNote.Interfaces.TableCellCollectionLoadOptions

Contains a collection of TableCell objects.

OneNote.Interfaces.TableCellCollectionUpdateData

An interface for updating data on the TableCellCollection object, for use in tableCellCollection.set({ ... }).

OneNote.Interfaces.TableCellData

An interface describing the data returned by calling tableCell.toJSON().

OneNote.Interfaces.TableCellLoadOptions

Represents a cell in a OneNote table.

OneNote.Interfaces.TableCellUpdateData

An interface for updating data on the TableCell object, for use in tableCell.set({ ... }).

OneNote.Interfaces.TableData

An interface describing the data returned by calling table.toJSON().

OneNote.Interfaces.TableLoadOptions

Represents a table in a OneNote page.

OneNote.Interfaces.TableRowCollectionData

An interface describing the data returned by calling tableRowCollection.toJSON().

OneNote.Interfaces.TableRowCollectionLoadOptions

Contains a collection of TableRow objects.

OneNote.Interfaces.TableRowCollectionUpdateData

An interface for updating data on the TableRowCollection object, for use in tableRowCollection.set({ ... }).

OneNote.Interfaces.TableRowData

An interface describing the data returned by calling tableRow.toJSON().

OneNote.Interfaces.TableRowLoadOptions

Represents a row in a table.

OneNote.Interfaces.TableUpdateData

An interface for updating data on the Table object, for use in table.set({ ... }).

OneNote.ParagraphInfo

List information for paragraph.

Enums

OneNote.ErrorCodes
OneNote.EventType
OneNote.InsertLocation
OneNote.ListType
OneNote.NoteTagStatus
OneNote.NoteTagType
OneNote.NumberType
OneNote.PageContentType
OneNote.ParagraphStyle
OneNote.ParagraphType

Functions

OneNote.run(batch)

Executes a batch script that performs actions on the OneNote object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released.

OneNote.run(object, batch)

Executes a batch script that performs actions on the OneNote object model, using the request context of a previously-created API object.

OneNote.run(objects, batch)

Executes a batch script that performs actions on the OneNote object model, using the request context of previously-created API objects.

Function Details

OneNote.run(batch)

Executes a batch script that performs actions on the OneNote object model, using a new request context. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released.

export function run<T>(batch: (context: OneNote.RequestContext) => Promise<T>): Promise<T>;

Parameters

batch

(context: OneNote.RequestContext) => Promise<T>

A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the OneNote application. Since the Office add-in and the OneNote application run in two different processes, the request context is required to get access to the OneNote object model from the add-in.

Returns

Promise<T>

OneNote.run(object, batch)

Executes a batch script that performs actions on the OneNote object model, using the request context of a previously-created API object.

export function run<T>(object: OfficeExtension.ClientObject, batch: (context: OneNote.RequestContext) => Promise<T>): Promise<T>;

Parameters

object
OfficeExtension.ClientObject

A previously-created API object. The batch will use the same request context as the passed-in object, which means that any changes applied to the object will be picked up by "context.sync()".

batch

(context: OneNote.RequestContext) => Promise<T>

A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released.

Returns

Promise<T>

OneNote.run(objects, batch)

Executes a batch script that performs actions on the OneNote object model, using the request context of previously-created API objects.

export function run<T>(objects: OfficeExtension.ClientObject[], batch: (context: OneNote.RequestContext) => Promise<T>): Promise<T>;

Parameters

batch

(context: OneNote.RequestContext) => Promise<T>

A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released.

Returns

Promise<T>