This is documentation for Mathematica 9, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Low-Level Notebook Programming

In Mathematica's unified symbolic architecture, every Mathematica notebook you see is represented as a symbolic expression that can be manipulated and controlled programmatically using Mathematica's symbolic language. Mathematica'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

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

Operations on Complete Notebooks

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

NotebookInformation information on open notebooks

SetSelectedNotebook ▪ NotebookClose ▪ NotebookSave ▪ NotebookPrint

Symbolic Notebook Structure »

NotebookGet get the symbolic representation of a displayed notebook

NotebookPut display the notebook corresponding to a symbolic expression

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

Modifying Notebook Contents

NotebookFind find a structure within a notebook

SelectionMove move the selection in a notebook

NotebookRead read the current selection as a symbolic expression

NotebookWrite, NotebookApply write, apply content at the current selection

NotebookDelete delete the current selection

ShowSelection ▪ Visible ▪ AutoScroll

NotebookSelection a handle to a selection in a notebook

SelectionEvaluate ▪ SelectionCreateCell ▪ SelectionAnimate

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