Low-Level Notebook Programming

In the Wolfram Language's unified symbolic architecture, every Wolfram Language notebook you see is represented as a symbolic expression that can be manipulated and controlled programmatically using the Wolfram Language. The Wolfram Language's low-level notebook programming functions give direct incremental access to notebook expressions, allowing you successively to perform arbitrary operations on the "selection" in any notebook.

Notebook Handles

Notebooks a list of open notebooks (NotebookObject objects)

SelectedNotebook  ▪  EvaluationNotebook  ▪  InputNotebook  ▪  ButtonNotebook  ▪  ParentNotebook

NotebookLocate locate a notebook, a web notebook, or a tag in a notebook

NotebookFileName  ▪  NotebookDirectory

Cell Handles

Cells a list of cells in a given notebook (CellObject objects)

SelectedCells  ▪  EvaluationCell  ▪  ParentCell  ▪  NextCell  ▪  PreviousCell

Boxes

BoxObject object representing an individual box

EvaluationBox  ▪  ParentBox

Operations on Complete Notebooks

Options, SetOptions, CurrentValue get or set any option of any notebook object

NotebookInformation information on open notebooks

NotebookCellData data about the cells in the notebook

NotebookOpen  ▪  SetSelectedNotebook  ▪  NotebookClose  ▪  NotebookSave  ▪  NotebookPrint

NotebookImport import structured material from a notebook

StripCellGrouping  ▪  CellStyleImportRules

Cell and Notebook Metadata

ExpressionUUID a unique UUID assigned to a cell or notebook

CellTags a list of tags associated with a cell

TaggingRules an association of rules containing metadata for a cell or notebook

StyleHints an association containing hints used to control stylesheet behaviors

AttachedCell  ▪  DockedCell  ▪  GeneratedCell  ▪  CellID

Symbolic Notebook Structure »

NotebookGet get the symbolic representation of a displayed notebook

NotebookPut display the notebook corresponding to a symbolic expression

CreateWindow create a new notebook window with a given set of options

Notebook  ▪  Cell  ▪  RowBox  ▪  ButtonBox  ▪  GridBox  ▪  ...

Modifying Notebook Contents

NotebookFind find a structure within a notebook

SelectionMove move the selection in a notebook

NotebookRead read a notebook structure as a symbolic expression

NotebookWrite, NotebookApply write, apply content into a notebook

NotebookDelete delete a notebook structure

AttachCell attach a floating cell to a part of the notebook or window

ShowSelection  ▪  Visible  ▪  AutoScroll

NotebookSelection a handle to a selection in a notebook

SelectionEvaluate  ▪  SelectionCreateCell

Global Front End Operations »

FrontEndTokenExecute execute a menu-like front end command

$FrontEnd  ▪  $FrontEndSession  ▪  FrontEndEventActions  ▪  ...

FrontEndExecute send an expression to be executed by the front end