We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
A set of utility functions are provided at notebookUtils.ts to allow the application developer to traverse notebooks.
These utilities are a WIP, and more will be added in the future.
OneNoteApi.NotebookUtils.sectionExistsInNotebooks(notebooks /* Notebook[] */, sectionId /* string */); // true/false
OneNoteApi.NotebookUtils.sectionExistsInParent(parent /* Notebook | SectionGroup */, sectionId /* string */); // true/false
// Returns section path (e.g., [Notebook, SectionGroup, ..., Section] OneNoteApi.NotebookUtils.getPathFromNotebooksToSection(notebooks /* Notebook[] */, function(section) { return section.name === "The section I want"; });
OneNoteApi.NotebookUtils.getPathFromParentToSection(parent /* Notebook | SectionGroup */, function(section) { return section.name === "The section I want" });
OneNoteApi.NotebookUtils.getDepthOfNotebooks(notebooks /* Notebook[] */); // Number
OneNoteApi.NotebookUtils.getDepthOfParent(parent /* Notebook | SectionGroup */); // Number
Home
Basics
Developers